Instruction
stringlengths
13
145k
input_code
stringlengths
35
390k
output_code
stringlengths
35
390k
tickets should be decoded on python 3 As seen from the recent quicket hook posts TypeError at /tickets/quicket_hook/ the JSON object must be str, not 'bytes'
wafer/tickets/views.py <|code_start|>import json import logging from django.conf import settings from django.contrib.auth import get_user_model from django.core.exceptions import PermissionDenied, ValidationError from django.core.urlresolvers import reverse from django.http import HttpResponse, Http404 from django.vie...
wafer/tickets/views.py <|code_start|>import json import logging from django.conf import settings from django.contrib.auth import get_user_model from django.core.exceptions import PermissionDenied, ValidationError from django.core.urlresolvers import reverse from django.http import HttpResponse, Http404 from django.vie...
Fix Python 3 regressions There are a couple places we use `.iteritems()` on dictionaries in the code: https://github.com/CTPUG/wafer/blob/a120735a20ff67c6f863c6ca89cc6dfd9b0fc16e/wafer/schedule/templates/admin/scheduleitem_list.html#L14 https://github.com/CTPUG/wafer/blob/a120735a20ff67c6f863c6ca89cc6dfd9b0fc16e/wafe...
wafer/registration/sso.py <|code_start|># coding: utf-8 import logging from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.models import Group from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist from django.db import IntegrityError impor...
wafer/registration/sso.py <|code_start|># coding: utf-8 import logging from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.models import Group from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist from django.db import IntegrityError impor...
Schedule rendering bug when an item is offset from a column spanning item Given the following setup, the schedule renders incorrectly Item A - slot A & B, expands over venues 1 & 2 Item B - slot A, venue 3 Item C - slot B, venue 3 Inserting an extra blank item between Item A and Item C in the table For example ![bu...
wafer/schedule/views.py <|code_start|>import datetime from django.views.generic import DetailView, TemplateView from rest_framework import viewsets from rest_framework.permissions import IsAdminUser from wafer.pages.models import Page from wafer.schedule.models import Venue, Slot, Day from wafer.schedule.admin import...
wafer/schedule/views.py <|code_start|>import datetime from django.views.generic import DetailView, TemplateView from rest_framework import viewsets from rest_framework.permissions import IsAdminUser from wafer.pages.models import Page from wafer.schedule.models import Venue, Slot, Day from wafer.schedule.admin import...
Add support for Django's redirect app to wafer It's useful to be able to add a redirect if a page is moved to a different point in the hierachy. Django's already got support for this, so we should leverage that. The potentially problematic part is how this iteracts with the static site generation, as django-medusa's ...
wafer/settings.py <|code_start|>import os from django.utils.translation import ugettext_lazy as _ try: from localsettings import * except ImportError: pass # Django settings for wafer project. ADMINS = ( # The logging config below mails admins # ('Your Name', 'your_email@example.com'), ) DATABASES ...
wafer/settings.py <|code_start|>import os from django.utils.translation import ugettext_lazy as _ try: from localsettings import * except ImportError: pass # Django settings for wafer project. ADMINS = ( # The logging config below mails admins # ('Your Name', 'your_email@example.com'), ) DATABASES ...
Schedule Editor does not clear extra fields on existing items When replacing an existing item in the schedule editor, the notes, css_class and details fields are not replaced or cleared. While this can be useful to leave css_class untouched, it is surprising behaviour and usually the wrong thing to do for notes and d...
wafer/schedule/serializers.py <|code_start|>from rest_framework import serializers from wafer.talks.models import Talk from wafer.pages.models import Page from wafer.schedule.models import ScheduleItem, Venue, Slot class ScheduleItemSerializer(serializers.HyperlinkedModelSerializer): page = serializers.PrimaryKe...
wafer/schedule/serializers.py <|code_start|>from rest_framework import serializers from wafer.talks.models import Talk from wafer.pages.models import Page from wafer.schedule.models import ScheduleItem, Venue, Slot class ScheduleItemSerializer(serializers.HyperlinkedModelSerializer): page = serializers.PrimaryKe...
Schedule Editor doesn't update revision information for ScheduleItems This is mainly so I don't lose track of this. Updating the schedule using the editor doesn't update the revision history for schedule items correctly, and attempting to add it, using the documented logic for reversion and rest APIs, doesn't work a...
wafer/schedule/admin.py <|code_start|>import datetime from collections import defaultdict from django.db.models import Q from django.conf.urls import url from django.contrib import admin from django.contrib import messages from django.utils.encoding import force_text from django.utils.translation import ugettext as _ ...
wafer/schedule/admin.py <|code_start|>import datetime from collections import defaultdict from django.db.models import Q from django.conf.urls import url from django.contrib import admin from django.contrib import messages from django.utils.encoding import force_text from django.utils.translation import ugettext as _ ...
Sponsors with multiple packages are listed for each package When a sponsor takes multiple packages (sponsorship and add-on package, for example), they are listed in the sponsor list and sponsor menu for each package, which is a bit surprising. See Microsoft from PyCon ZA 2018, for example. ![microsoft_multiple](http...
wafer/sponsors/models.py <|code_start|># -*- coding: utf-8 -*- import logging from django.core.validators import MinValueValidator from django.db import models from django.db.models.signals import post_save from django.urls import reverse from django.utils.encoding import python_2_unicode_compatible from django.utils...
wafer/sponsors/models.py <|code_start|># -*- coding: utf-8 -*- import logging from django.core.validators import MinValueValidator from django.db import models from django.db.models.signals import post_save from django.urls import reverse from django.utils.encoding import python_2_unicode_compatible from django.utils...
Separate video export from pentabarf and all that Hacking all the video information into the pentabarf export is not the best idea, despite it's convience. We should add a specific video info export (json probably makes the most sense) to handle this use case.
wafer/schedule/urls.py <|code_start|>from django.conf.urls import include, url from rest_framework import routers from wafer.schedule.views import ( CurrentView, ScheduleView, ScheduleItemViewSet, ScheduleXmlView, VenueView, ICalView) router = routers.DefaultRouter() router.register(r'scheduleitems', Schedul...
wafer/schedule/urls.py <|code_start|>from django.conf.urls import include, url from rest_framework import routers from wafer.schedule.views import ( CurrentView, ScheduleView, ScheduleItemViewSet, ScheduleXmlView, VenueView, ICalView, JsonDataView) router = routers.DefaultRouter() router.register(r'schedulei...
Add support for Django 4.0 Currently failing tests (See #632)
setup.py <|code_start|>from glob import glob import subprocess from setuptools import find_packages, setup REQUIRES = [ 'Django>=2.2,<4', 'bleach', 'bleach-allowlist', 'diff-match-patch', 'django-bakery>=0.12.0', 'django-crispy-forms', 'django-markitup>=4.0.0', 'django-registration-red...
setup.py <|code_start|>from glob import glob import subprocess from setuptools import find_packages, setup REQUIRES = [ 'Django>=2.2,<4', 'bleach', 'bleach-allowlist', 'diff-match-patch', 'django-bakery>=0.13.0', 'django-crispy-forms', 'django-markitup>=4.0.0', 'django-registration-red...
icalendar 5.0 breaks the tests With icalendar 5.0, the test_ics_view test fails with ``` File "/home/runner/work/wafer/wafer/wafer/schedule/tests/test_views.py", line 1526, in test_ics_view 20 self.assertEqual(event['dtstart'].params['value'], 'DATE-TIME') 21 File "/opt/hostedtoolcache/Python/3.7.15/x64/lib...
setup.py <|code_start|>from glob import glob import subprocess from setuptools import find_packages, setup REQUIRES = [ 'Django>=2.2,<5', 'bleach', 'bleach-allowlist', 'diff-match-patch', 'django-bakery>=0.13.0', 'django-crispy-forms', 'django-markitup>=4.0.0', 'django-registration-red...
setup.py <|code_start|>from glob import glob import subprocess from setuptools import find_packages, setup REQUIRES = [ 'Django>=2.2,<5', 'bleach', 'bleach-allowlist', 'diff-match-patch', 'django-bakery>=0.13.0', 'django-crispy-forms', 'django-markitup>=4.0.0', 'django-registration-red...
Custom talk deletion logic breaks with Django >= 4.0 The custom logic to turn talk deletions into withdrawals doesn't work with Django >= 4.0 Quoting from the Django 4 release notes ```In accordance with FormMixin, object deletion for POST requests is handled in form_valid(). Custom delete logic in delete() handl...
wafer/talks/views.py <|code_start|>from itertools import groupby from django.conf import settings from django.contrib.auth.mixins import ( LoginRequiredMixin, PermissionRequiredMixin) from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied, ValidationError from djan...
wafer/talks/views.py <|code_start|>from itertools import groupby from django.conf import settings from django.contrib.auth.mixins import ( LoginRequiredMixin, PermissionRequiredMixin) from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied, ValidationError from djan...
Flag to hide the schedule until it's ready Probably a django setting to keep the schedule from publishing until the content team is ready. It would be nice to have a button on the site to do this, but no obvious place to store the state.
wafer/schedule/admin.py <|code_start|>import datetime from collections import defaultdict from django.db.models import Q from django.urls import re_path from django.core.exceptions import ValidationError from django.contrib import admin from django.contrib import messages from django.utils.encoding import force_str f...
wafer/schedule/admin.py <|code_start|>import datetime from collections import defaultdict from django.db.models import Q from django.urls import re_path from django.core.exceptions import ValidationError from django.contrib import admin from django.contrib import messages from django.utils.encoding import force_str f...
Schedule validation check for speaker conflicts Don't let one speaker speak in two venues at the same time. It's hard on the speakers. We have a schedule validation framework, checking for this should be simple.
wafer/schedule/admin.py <|code_start|>import datetime from collections import defaultdict from django.db.models import Q from django.urls import re_path from django.core.exceptions import ValidationError from django.contrib import admin from django.contrib import messages from django.utils.encoding import force_str f...
wafer/schedule/admin.py <|code_start|>import datetime from collections import defaultdict from django.db.models import Q from django.urls import re_path from django.core.exceptions import ValidationError from django.contrib import admin from django.contrib import messages from django.utils.encoding import force_str f...
Schedule Editor should report validation errors The drag-n-drop schedule should report any validation errors that apply to the current schedule
wafer/schedule/urls.py <|code_start|>from django.urls import include, re_path from rest_framework import routers from wafer.schedule.views import ( CurrentView, ScheduleView, ScheduleItemViewSet, ScheduleXmlView, VenueView, ICalView, JsonDataView) router = routers.DefaultRouter() router.register(r'scheduleit...
wafer/schedule/urls.py <|code_start|>from django.urls import include, re_path from rest_framework import routers from wafer.schedule.views import ( CurrentView, ScheduleView, ScheduleItemViewSet, ScheduleXmlView, VenueView, ICalView, JsonDataView, get_validation_info) router = routers.DefaultRouter() router....
[ENHANCEMENT] `chia wallet` should have a way to get next receive address Right now the only easy way to get a wallet receive address is in the GUI or to grab the first wallet address in `chia keys show`. We should probably both: - Display a current valid receive address in `chia wallet show` - Have a way to inc...
src/cmds/wallet.py <|code_start|>import click import sys import time from datetime import datetime from typing import Tuple, Optional, Callable, List import aiohttp import asyncio from src.rpc.wallet_rpc_client import WalletRpcClient from src.util.bech32m import encode_puzzle_hash from src.util.byte_types import hexs...
src/cmds/wallet.py <|code_start|>import click import sys import time from datetime import datetime from typing import Tuple, Optional, Callable, List import aiohttp import asyncio from src.rpc.wallet_rpc_client import WalletRpcClient from src.util.bech32m import encode_puzzle_hash from src.util.byte_types import hexs...
[ENHANCEMENT] CLI get transactions, improve usability **Describe the bug** Farmed 4 blocks, only see transactions for the first 3 in the CLI.
chia/cmds/wallet.py <|code_start|>import click @click.group("wallet", short_help="Manage your wallet") def wallet_cmd() -> None: pass @wallet_cmd.command("get_transaction", short_help="Get a transaction") @click.option( "-wp", "--wallet-rpc-port", help="Set the port where the Wallet is hosting the R...
chia/cmds/wallet.py <|code_start|>import click @click.group("wallet", short_help="Manage your wallet") def wallet_cmd() -> None: pass @wallet_cmd.command("get_transaction", short_help="Get a transaction") @click.option( "-wp", "--wallet-rpc-port", help="Set the port where the Wallet is hosting the R...
Typo https://github.com/Chia-Network/chia-blockchain/blob/ec0a4cec4bc154e4918d34a5c389b47074fa645b/chia/cmds/plots.py#L128
chia/cmds/init.py <|code_start|>import click @click.command("init", short_help="Create or migrate the configuration") @click.option( "--create-certs", "-c", default=None, help="Create new SSL certificates based on CA in [directory]", type=click.Path(), ) @click.pass_context def init_cmd(ctx: click...
chia/cmds/init.py <|code_start|>import click @click.command("init", short_help="Create or migrate the configuration") @click.option( "--create-certs", "-c", default=None, help="Create new SSL certificates based on CA in [directory]", type=click.Path(), ) @click.pass_context def init_cmd(ctx: click...
[BUG] Harvester plots_refresh_parameter not keeping track of plots The harvester is losing track of my plots during replotting, and my plot count is going down. I have 5156 plots. All of my drives are full, so I am currently replotting. I have a script that, upon completion of a new NFT plot, it identifies an OG pl...
chia/plotting/manager.py <|code_start|>import logging import threading import time import traceback from functools import reduce from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple from concurrent.futures.thread import ThreadPoolExecutor from blspy import G1Element from chiapos ...
chia/plotting/manager.py <|code_start|>import logging import threading import time import traceback from functools import reduce from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple from concurrent.futures.thread import ThreadPoolExecutor from blspy import G1Element from chiapos ...
[BUG] Need to check pool contract address on existing plot **Describe the bug** You can see the public farmer key of a plot but not the pool contract address when using chia plots check **To Reproduce** Chia plots check, pool address is blank, no area for contract address **Expected behavior** Show pool contra...
chia/plotting/check_plots.py <|code_start|>import logging from collections import Counter from pathlib import Path from time import time, sleep from typing import List from blspy import G1Element from chiapos import Verifier from chia.plotting.manager import PlotManager from chia.plotting.util import ( PlotRefres...
chia/plotting/check_plots.py <|code_start|>import logging from collections import Counter from pathlib import Path from time import time, sleep from typing import List from blspy import G1Element from chiapos import Verifier from chia.plotting.manager import PlotManager from chia.plotting.util import ( PlotRefres...
[Bug] ERROR Exception: dictionary changed size during iteration ### What happened? Errors in some remote harvesters' logs and corresponding farmer log. A remote harvester showing this ERROR is either plotting (using bladebit) or receiving (NFT) plots over rsync (using plotman). From time to time remote harvester...
chia/plotting/manager.py <|code_start|>from dataclasses import dataclass import logging import threading import time import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple from concurrent.futures.thread import ThreadPoolExecutor from blspy import G1Element from chi...
chia/plotting/manager.py <|code_start|>from dataclasses import dataclass import logging import threading import time import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple from concurrent.futures.thread import ThreadPoolExecutor from blspy import G1Element from chi...
[Bug] Light Wallet beta shows previous wallets info on Cats tab (ie. SBX) until synced. ### What happened? When I switch wallets in the light wallet beta, the Spacebucks (SBX) info tab shows the previous wallets info until the current wallet finishes syncing. This includes balance and transactions. ### Version 1.2....
chia/rpc/wallet_rpc_api.py <|code_start|>import asyncio import logging from pathlib import Path from typing import Callable, Dict, List, Optional, Tuple, Set, Any from blspy import PrivateKey, G1Element from clvm_tools import binutils from chia.consensus.block_rewards import calculate_base_farmer_reward from chia.poo...
chia/rpc/wallet_rpc_api.py <|code_start|>import asyncio import logging from pathlib import Path from typing import Callable, Dict, List, Optional, Tuple, Set, Any from blspy import PrivateKey, G1Element from clvm_tools import binutils from chia.consensus.block_rewards import calculate_base_farmer_reward from chia.poo...
[Bug] CLI error returned when running `chia plotnft claim` ### What happened? ``` chia plotnft claim -i 2 Will claim rewards for wallet ID: 2. Error performing operation on Plot NFT -f xxxxxxxxxx wallet id: 2: 'dict' object has no attribute 'name' ``` The claim transaction does go through - but the CLI is rep...
chia/cmds/plotnft_funcs.py <|code_start|>from collections import Counter from decimal import Decimal from dataclasses import replace import aiohttp import asyncio import functools import json import time from pprint import pprint from typing import List, Dict, Optional, Callable from chia.cmds.units import units fro...
chia/cmds/plotnft_funcs.py <|code_start|>from collections import Counter from decimal import Decimal from dataclasses import replace import aiohttp import asyncio import functools import json import time from pprint import pprint from typing import List, Dict, Optional, Callable from chia.cmds.units import units fro...
[Bug] Harvester delays on plots refresh with many plots ### What happened? 1.3.0 Got 3 reports of big harvesters seeing a delay between the triggering of `interval_timer:` and the first batch processing: Harvester with 7800~ plots, the harvester is starting `_plot_refresh_callback: event started` at `05.369` s...
chia/plotting/manager.py <|code_start|>from dataclasses import dataclass import logging import threading import time import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple from concurrent.futures.thread import ThreadPoolExecutor from blspy import G1Element from chi...
chia/plotting/manager.py <|code_start|>from dataclasses import dataclass import logging import threading import time import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple from concurrent.futures.thread import ThreadPoolExecutor from blspy import G1Element from chi...
Loading plots randomly rather than in order ### What happened? Upgraded from 1.3.4 to 1.3.5 and when loading plots it randomly finds them all over the place rather than in order? i.e should be disk 1 plot 1 to 100 disk 2 plot 1 to 100 and so on but its disk 10 plot 45 disk 3 plot 67 disk 12 plot 4 ...
chia/plotting/manager.py <|code_start|>import logging import threading import time import traceback from concurrent.futures.thread import ThreadPoolExecutor from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple from blspy import G1Element from chiapos import DiskProver from chia....
chia/plotting/manager.py <|code_start|>import logging import threading import time import traceback from concurrent.futures.thread import ThreadPoolExecutor from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple from blspy import G1Element from chiapos import DiskProver from chia....
[Bug] IPv6 RPC connections broken ### What happened? https://github.com/Chia-Network/chia-blockchain/pull/11578 broke IPv6 RPC connections by hard coding `0.0.0.0` for the host at https://github.com/Chia-Network/chia-blockchain/pull/11578/files#diff-926449f427065cf100c0af5785ac61529c768ab4cccbef25ccb86e82074b753fR27...
chia/rpc/rpc_server.py <|code_start|>import asyncio import json import logging import traceback from pathlib import Path from typing import Any, Callable, Coroutine, Dict, List, Optional, Tuple from aiohttp import ClientConnectorError, ClientSession, ClientWebSocketResponse, WSMsgType, web from chia.rpc.util import w...
chia/rpc/rpc_server.py <|code_start|>import asyncio import json import logging import traceback from pathlib import Path from typing import Any, Callable, Coroutine, Dict, List, Optional, Tuple from aiohttp import ClientConnectorError, ClientSession, ClientWebSocketResponse, WSMsgType, web from chia.rpc.util import w...
Loading plots randomly rather than in order ### What happened? Upgraded from 1.3.4 to 1.3.5 and when loading plots it randomly finds them all over the place rather than in order? i.e should be disk 1 plot 1 to 100 disk 2 plot 1 to 100 and so on but its disk 10 plot 45 disk 3 plot 67 disk 12 plot 4 ...
chia/plotting/manager.py <|code_start|>import logging import threading import time import traceback from concurrent.futures.thread import ThreadPoolExecutor from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple from blspy import G1Element from chiapos import DiskProver from chia....
chia/plotting/manager.py <|code_start|>import logging import threading import time import traceback from concurrent.futures.thread import ThreadPoolExecutor from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple from blspy import G1Element from chiapos import DiskProver from chia....
Finalize default amount for CLI when adding a mirror (chia data add_mirror)
chia/cmds/data.py <|code_start|>import json import logging from pathlib import Path from typing import Any, Coroutine, Dict, List, Optional, TypeVar import click from typing_extensions import Protocol _T = TypeVar("_T") class IdentityFunction(Protocol): def __call__(self, __x: _T) -> _T: ... logger = ...
chia/cmds/data.py <|code_start|>import json import logging from pathlib import Path from typing import Any, Coroutine, Dict, List, Optional, TypeVar import click from typing_extensions import Protocol _T = TypeVar("_T") class IdentityFunction(Protocol): def __call__(self, __x: _T) -> _T: ... logger = ...
Remove or Set to 0 DataLayer default fee
chia/rpc/data_layer_rpc_api.py <|code_start|>from __future__ import annotations import dataclasses from pathlib import Path from typing import TYPE_CHECKING, Any, Dict, List, Optional, cast from chia.data_layer.data_layer_errors import OfferIntegrityError from chia.data_layer.data_layer_util import ( CancelOfferR...
chia/rpc/data_layer_rpc_api.py <|code_start|>from __future__ import annotations import dataclasses from pathlib import Path from typing import TYPE_CHECKING, Any, Dict, List, Optional, cast from chia.data_layer.data_layer_errors import OfferIntegrityError from chia.data_layer.data_layer_util import ( CancelOfferR...
[Bug] plots beyond ~4400 = harvester 100.0 load, cache_hit: false, plots check hangs before challenges ### What happened? Noted that for the last few releases, chia_harvester was pegging a thread continuously while farming. Info: - System has >20k plots direct attached. Single harvester. - plot_refresh_callback...
chia/plotting/cache.py <|code_start|>import logging import time import traceback from dataclasses import dataclass, field from pathlib import Path from typing import Dict, ItemsView, KeysView, List, Optional, Tuple, ValuesView from blspy import G1Element from chiapos import DiskProver from chia.plotting.util import p...
chia/plotting/cache.py <|code_start|>import logging import time import traceback from dataclasses import dataclass, field from math import ceil from pathlib import Path from typing import Dict, ItemsView, KeysView, List, Optional, Tuple, ValuesView from blspy import G1Element from chiapos import DiskProver from chia....
[Bug] Python 3.10.8 causes full node to be unable to connect to peers ### What happened? After upgrading Arch Linux, which upgrades python to 3.10.8, I found that the full node was unable to connect to any peers and sync, and there were python errors in the log. I tried to downgrade chia to 1.5.1 and the problem remai...
chia/full_node/full_node_api.py <|code_start|>import asyncio import dataclasses import logging import time import traceback import functools from secrets import token_bytes from typing import Dict, List, Optional, Tuple, Set from blspy import AugSchemeMPL, G2Element, G1Element from chiabip158 import PyBIP158 import c...
chia/full_node/full_node_api.py <|code_start|>import asyncio import dataclasses import logging import time import traceback import functools from secrets import token_bytes from typing import Dict, List, Optional, Tuple, Set from blspy import AugSchemeMPL, G2Element, G1Element from chiabip158 import PyBIP158 import c...
[Bug] 'chia wallet get_transactions' isn't working in git-main ### What happened? ```` $ chia wallet get_transactions Exception from 'wallet' 'str' object has no attribute 'name' ```` ### Version chia-blockchain-1.6.1b4.dev16 ### What platform are you using? Linux ### What ui mode are you using? CLI ### Rele...
chia/cmds/wallet.py <|code_start|>import sys from typing import Any, Dict, List, Optional, Tuple import click from chia.cmds.plotnft import validate_fee from chia.wallet.transaction_sorting import SortKey from chia.wallet.util.address_type import AddressType from chia.wallet.util.wallet_types import WalletType from c...
chia/cmds/wallet.py <|code_start|>import sys from typing import Any, Dict, List, Optional, Tuple import click from chia.cmds.plotnft import validate_fee from chia.wallet.transaction_sorting import SortKey from chia.wallet.util.address_type import AddressType from chia.wallet.util.wallet_types import WalletType from c...
Sending a CAT with a fee in the Windows CLI is not producing the same effect as sending a CAT with a fee in the Windows GUI (this might be true on other systems) CAT sent with a fee from the GUI: ![Image](https://user-images.githubusercontent.com/8990544/207227164-62993da6-bbcd-431c-a695-ff076acbeb0d.png) CAT sent wit...
chia/cmds/wallet_funcs.py <|code_start|>from __future__ import annotations import asyncio import os import pathlib import sys import time from datetime import datetime from decimal import Decimal from typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple, Union from chia.cmds.cmds_util import transactio...
chia/cmds/wallet_funcs.py <|code_start|>from __future__ import annotations import asyncio import os import pathlib import sys import time from datetime import datetime from decimal import Decimal from typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple, Union from chia.cmds.cmds_util import transactio...
Confusing docstring line _Originally posted by @arvidn in https://github.com/Chia-Network/chia-blockchain/pull/13976#discussion_r1029192732_ I can't parse this sentence. is it supposed to say "inside one *of* the mempools"? But we only have one mempool, so I still wouldn't know what that means reall...
chia/full_node/mempool_manager.py <|code_start|>from __future__ import annotations import asyncio import logging import time from concurrent.futures import Executor from concurrent.futures.process import ProcessPoolExecutor from multiprocessing.context import BaseContext from typing import Awaitable, Callable, Dict, L...
chia/full_node/mempool_manager.py <|code_start|>from __future__ import annotations import asyncio import logging import time from concurrent.futures import Executor from concurrent.futures.process import ProcessPoolExecutor from multiprocessing.context import BaseContext from typing import Awaitable, Callable, Dict, L...
[Bug] Error when Viewing Pool Login Link ### What happened? The original error was that there was no current difficulty. Because of that I wasn't receiving any partials and whenever I try to view the Pool Login Link I get the following error: ``` TypeError: unsupported operand type(s) for /: 'int' and 'NoneType'...
chia/farmer/farmer.py <|code_start|>from __future__ import annotations import asyncio import json import logging import time import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple import aiohttp from blspy import AugSchemeMPL, G1Element, G2Element, PrivateKey fro...
chia/farmer/farmer.py <|code_start|>from __future__ import annotations import asyncio import json import logging import time import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple import aiohttp from blspy import AugSchemeMPL, G1Element, G2Element, PrivateKey fro...
[Bug] Windows CLI waits for passphrase input but no longer prompts for it in 1.7.1 ### What happened? When using the CLI to start the wallet (or indeed any service) - the prompt `(Unlock Keyring) Passphrase:` is no longer shown until *after* the passphrase is entered. The daemon will display `Starting daemon` and t...
chia/cmds/passphrase_funcs.py <|code_start|>from __future__ import annotations import os import sys import time from getpass import getpass from io import TextIOWrapper from pathlib import Path from typing import Any, Dict, Optional, Tuple import colorama from chia.daemon.client import acquire_connection_to_daemon f...
chia/cmds/passphrase_funcs.py <|code_start|>from __future__ import annotations import os import sys import time from getpass import getpass from io import TextIOWrapper from pathlib import Path from typing import Any, Dict, Optional, Tuple import colorama from chia.daemon.client import acquire_connection_to_daemon f...
[Bug] dictionary changed size during iteration ### What happened? when switching between wallets ![wallet_change_error_GUI](https://user-images.githubusercontent.com/116583441/234676534-8ff77ef9-f1ac-4301-b134-2b52bcc1a437.png) occured. after clicking [OK] and clicking on the desired wallet, it will load without ...
chia/wallet/wallet_state_manager.py <|code_start|>from __future__ import annotations import asyncio import logging import multiprocessing.context import time import traceback from contextlib import asynccontextmanager from pathlib import Path from secrets import token_bytes from typing import Any, AsyncIterator, Calla...
chia/wallet/wallet_state_manager.py <|code_start|>from __future__ import annotations import asyncio import logging import multiprocessing.context import time import traceback from contextlib import asynccontextmanager from pathlib import Path from secrets import token_bytes from typing import Any, AsyncIterator, Calla...
[Bug] dictionary changed size during iteration ### What happened? when switching between wallets ![wallet_change_error_GUI](https://user-images.githubusercontent.com/116583441/234676534-8ff77ef9-f1ac-4301-b134-2b52bcc1a437.png) occured. after clicking [OK] and clicking on the desired wallet, it will load without ...
chia/wallet/wallet_node.py <|code_start|>from __future__ import annotations import asyncio import dataclasses import logging import multiprocessing import random import sys import time import traceback from pathlib import Path from typing import Any, Dict, List, Optional, Set, Tuple, Union import aiosqlite from blspy...
chia/wallet/wallet_node.py <|code_start|>from __future__ import annotations import asyncio import dataclasses import logging import multiprocessing import random import sys import time import traceback from pathlib import Path from typing import Any, Dict, List, Optional, Set, Tuple, Union import aiosqlite from blspy...
[Bug] dictionary changed size during iteration ### What happened? when switching between wallets ![wallet_change_error_GUI](https://user-images.githubusercontent.com/116583441/234676534-8ff77ef9-f1ac-4301-b134-2b52bcc1a437.png) occured. after clicking [OK] and clicking on the desired wallet, it will load without ...
chia/wallet/wallet_node.py <|code_start|>from __future__ import annotations import asyncio import dataclasses import logging import multiprocessing import random import sys import time import traceback from pathlib import Path from typing import Any, Dict, List, Optional, Set, Tuple, Union import aiosqlite from blspy...
chia/wallet/wallet_node.py <|code_start|>from __future__ import annotations import asyncio import dataclasses import logging import multiprocessing import random import sys import time import traceback from pathlib import Path from typing import Any, Dict, List, Optional, Set, Tuple, Union import aiosqlite from blspy...
[Bug] duplicated short options, `-r`, in `make_offer` CLI causing missing option error. ### What happened? `-r` is already used for `--request` but it's now also used for `--reuse`, `Reuse existing address for the change.`, and this causes `make_offer` error, `Error: Missing option '-r' / '--request'.` https://gith...
chia/cmds/wallet.py <|code_start|>from __future__ import annotations import sys from typing import Any, Dict, List, Optional, Tuple import click from chia.cmds.check_wallet_db import help_text as check_help_text from chia.cmds.cmds_util import execute_with_wallet from chia.cmds.coins import coins_cmd from chia.cmds....
chia/cmds/wallet.py <|code_start|>from __future__ import annotations import sys from typing import Any, Dict, List, Optional, Tuple import click from chia.cmds.check_wallet_db import help_text as check_help_text from chia.cmds.cmds_util import execute_with_wallet from chia.cmds.coins import coins_cmd from chia.cmds....
CLI: Offer shows XCH instead of TXCH when connected to a testnet Can confirm I also saw this in Ubuntu 20.04, same build of chia, in CLI. From a different Offer: ``` Summary: OFFERED: - None (Wallet ID: 2): 1000.0 (1000000 mojos) REQUESTED: - XCH (Wallet ID: 1): 1.0 (1000000000000 mojos) Included F...
chia/cmds/wallet_funcs.py <|code_start|>from __future__ import annotations import asyncio import json import os import pathlib import sys import time from datetime import datetime from decimal import Decimal from typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple, Union from chia.cmds.cmds_util impor...
chia/cmds/wallet_funcs.py <|code_start|>from __future__ import annotations import asyncio import json import os import pathlib import sys import time from datetime import datetime from decimal import Decimal from typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple, Union from chia.cmds.cmds_util impor...
CLI nft listing doesn't support pagination When listing NFTs on the CLI, the number of returned NFTs is capped at 50 due to the RPC hardcoding a default `num` value. Since the CLI doesn't expose `--start-index` and `--num` options, there's no way to get a complete listing for collections > 50 NFTs. Should be a simpl...
chia/cmds/wallet.py <|code_start|>from __future__ import annotations import asyncio import sys from decimal import Decimal from typing import List, Optional, Sequence import click from chia.cmds.check_wallet_db import help_text as check_help_text from chia.cmds.coins import coins_cmd from chia.cmds.plotnft import va...
chia/cmds/wallet.py <|code_start|>from __future__ import annotations import asyncio import sys from decimal import Decimal from typing import List, Optional, Sequence import click from chia.cmds.check_wallet_db import help_text as check_help_text from chia.cmds.coins import coins_cmd from chia.cmds.plotnft import va...
[Bug] Datalayer subscribing to new store sometimes fails with Launcher ID is not a valid coin ### What happened? Occasional failures when subscribing to a datalayer singleton with `Launcher ID <id> is not a valid coin` - for example: ``` 2023-05-30T15:25:35.014 wallet chia.rpc.util : WARNING Error whil...
chia/data_layer/data_layer_errors.py <|code_start|>from __future__ import annotations from typing import Iterable, List from chia.types.blockchain_format.sized_bytes import bytes32 class IntegrityError(Exception): pass def build_message_with_hashes(message: str, bytes_objects: Iterable[bytes]) -> str: ret...
chia/data_layer/data_layer_errors.py <|code_start|>from __future__ import annotations from typing import Iterable, List from chia.types.blockchain_format.sized_bytes import bytes32 class IntegrityError(Exception): pass def build_message_with_hashes(message: str, bytes_objects: Iterable[bytes]) -> str: ret...
[Bug] Module `chia.wallet.puzzles.clawback` not found ### What happened? When installing `1.8.2-rc3` or `master` via `pip`, the module `chia.wallet.puzzles.clawback` is missing. The files are not included because the packages are not listed in `setup.py`. This is also true of the `prefarm` sibling package. ### Ve...
setup.py <|code_start|>from __future__ import annotations import os import sys from setuptools import setup dependencies = [ "aiofiles==23.1.0", # Async IO for files "anyio==3.6.2", "boto3==1.26.148", # AWS S3 for DL s3 plugin "blspy==1.0.16", # Signature library "chiavdf==1.0.8", # timelord ...
setup.py <|code_start|>from __future__ import annotations import os import sys from setuptools import setup dependencies = [ "aiofiles==23.1.0", # Async IO for files "anyio==3.6.2", "boto3==1.26.148", # AWS S3 for DL s3 plugin "blspy==1.0.16", # Signature library "chiavdf==1.0.8", # timelord ...
[Bug] Chia Plots Check fails on 2.0.0-rc5 when Parallel Decompressor Count set to 0 ### What happened? reported by Ultrajones (https://discord.com/channels/1034523881404370984/1099818017908592660/1141527857462530068) and nanofarmer (https://discord.com/channels/1034523881404370984/1034870571864948777/11417758748788737...
chia/plotting/check_plots.py <|code_start|>from __future__ import annotations import concurrent.futures import logging import multiprocessing from collections import Counter from pathlib import Path from threading import Lock from time import sleep, time from typing import List, Optional from blspy import G1Element f...
chia/plotting/check_plots.py <|code_start|>from __future__ import annotations import concurrent.futures import logging import multiprocessing from collections import Counter from pathlib import Path from threading import Lock from time import sleep, time from typing import List, Optional from blspy import G1Element f...
[Bug] farmer-only connect to incorrect full node host ### What happened? Hi on 2.0.0 when calling chia farm summary, it connect to incorrect host. My setup is ``` harvester machine ---> farmer-only vps (docker) ----> full_node vps (docker) ``` Using config from https://github.com/Chia-Network/chia-blockchai...
chia/cmds/farm_funcs.py <|code_start|>from __future__ import annotations from pathlib import Path from typing import Any, Dict, List, Optional from chia.cmds.cmds_util import get_any_service_client from chia.cmds.units import units from chia.consensus.block_record import BlockRecord from chia.rpc.farmer_rpc_client im...
chia/cmds/farm_funcs.py <|code_start|>from __future__ import annotations import sys import traceback from pathlib import Path from typing import Any, Dict, List, Optional from chia.cmds.cmds_util import get_any_service_client from chia.cmds.units import units from chia.consensus.block_record import BlockRecord from c...
[Bug] farmer-only connect to incorrect full node host ### What happened? Hi on 2.0.0 when calling chia farm summary, it connect to incorrect host. My setup is ``` harvester machine ---> farmer-only vps (docker) ----> full_node vps (docker) ``` Using config from https://github.com/Chia-Network/chia-blockchai...
chia/cmds/farm_funcs.py <|code_start|>from __future__ import annotations from pathlib import Path from typing import Any, Dict, List, Optional from chia.cmds.cmds_util import get_any_service_client from chia.cmds.units import units from chia.consensus.block_record import BlockRecord from chia.rpc.farmer_rpc_client im...
chia/cmds/farm_funcs.py <|code_start|>from __future__ import annotations import sys import traceback from pathlib import Path from typing import Any, Dict, List, Optional from chia.cmds.cmds_util import get_any_service_client from chia.cmds.units import units from chia.consensus.block_record import BlockRecord from c...
(Bug) Unable to run Chia using Windows on AMD K10 architecture (AMD Phenom) ### What happened? hello, I would like someone to help me. this is how the chia app works for me on 1.8.2. since I want a stronger version, when I install 2.0 or 2.0.1 I have a problem. the problem is the following. When entering the applicati...
setup.py <|code_start|>from __future__ import annotations import os import sys from setuptools import find_packages, setup dependencies = [ "aiofiles==23.2.1", # Async IO for files "anyio==4.0.0", "boto3==1.29.4", # AWS S3 for DL s3 plugin "chiavdf==1.1.0", # timelord and vdf verification "chi...
setup.py <|code_start|>from __future__ import annotations import os import sys from setuptools import find_packages, setup dependencies = [ "aiofiles==23.2.1", # Async IO for files "anyio==4.0.0", "boto3==1.29.4", # AWS S3 for DL s3 plugin "chiavdf==1.1.0", # timelord and vdf verification "chi...
Delete key from GUI fails [Bug] ### What happened? Delete key from the GUI fails, but it succeeds from the CLI. To recreate: - create a new key with the GUI - "logout" to show the `wallet keys` diaglog - Click the three vertical dots on the new key, and click `Delete` A new spinner appears, but the key is no...
chia/rpc/wallet_rpc_api.py <|code_start|>from __future__ import annotations import dataclasses import json import logging import zlib from pathlib import Path from typing import Any, ClassVar, Dict, List, Optional, Set, Tuple, Union from chia_rs import AugSchemeMPL, G1Element, G2Element, PrivateKey from clvm_tools.bi...
chia/rpc/wallet_rpc_api.py <|code_start|>from __future__ import annotations import dataclasses import json import logging import zlib from pathlib import Path from typing import Any, ClassVar, Dict, List, Optional, Set, Tuple, Union from chia_rs import AugSchemeMPL, G1Element, G2Element, PrivateKey from clvm_tools.bi...
[Bug] missing output filename causes exception, but still creates offer and does not show to user ### What happened? ``` ~/chia-blockchain$ chia wallet make_offer -f 1849xxxx -o 2:2 -r 1:0.0000001 -p /home/jm -m 0.000000000005 Creating Offer -------------- OFFERING: - 2 Chia Holiday 2021 Token (2000 mojos) R...
chia/cmds/wallet.py <|code_start|>from __future__ import annotations import asyncio from decimal import Decimal from typing import List, Optional, Sequence import click from chia.cmds import options from chia.cmds.check_wallet_db import help_text as check_help_text from chia.cmds.coins import coins_cmd from chia.cmd...
chia/cmds/wallet.py <|code_start|>from __future__ import annotations import asyncio import pathlib from decimal import Decimal from typing import List, Optional, Sequence import click from chia.cmds import options from chia.cmds.check_wallet_db import help_text as check_help_text from chia.cmds.coins import coins_cm...
Add hel.fi event languages (as in_language?)
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta from dateutil.parser import parse as dateutil_parse # django and drf from django.contrib.auth import get_u...
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta from dateutil.parser import parse as dateutil_parse # django and drf from django.contrib.auth import get_u...
Add short description in kulke importer
events/importer/kulke.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os import re import functools from lxml import etree from modeltranslation.translator import translator import dateutil from pytz import timezone from django.conf import settings from django.utils.timezone impo...
events/importer/kulke.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os import re import functools from lxml import etree from modeltranslation.translator import translator import dateutil from pytz import timezone from django.conf import settings from django.utils.timezone impo...
Fix unicode in url references for e.g. Keywords
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta from dateutil.parser import parse as dateutil_parse # django and drf from django.http import Http404 from ...
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta from dateutil.parser import parse as dateutil_parse # django and drf from django.http import Http404 from ...
Add place to django-admin
events/admin.py <|code_start|>from django.contrib import admin from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.gis import admin as geoadmin from django.contrib.gis.db import models from django.utils.translation import ugettext as _ from modeltranslation.admin import TranslationAdmin ...
events/admin.py <|code_start|>from django.conf import settings from django.contrib import admin from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.gis import admin as geoadmin from django.contrib.gis.db import models from django.utils.translation import ugettext as _ from modeltranslati...
Reorganize "kohderyhmät" on yso basis, add sote categories
events/management/commands/add_helsinki_audience.py <|code_start|><|code_end|>
events/management/commands/add_helsinki_audience.py <|code_start|>from functools import lru_cache from django.core.management.base import BaseCommand, CommandError from django.db import transaction from events.models import Event, Keyword, KeywordSet HELSINKI_KEYWORD_SET_DATA = { 'id': 'helsinki:audiences', ...
Add validation for end_time/start_time < now
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta from dateutil.parser import parse as dateutil_parse # django and drf from django.http import Http404 from ...
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta from dateutil.parser import parse as dateutil_parse # django and drf from django.http import Http404 from ...
Use ArgumentParser instead of deprecated OptionParser in management commands `python manage.py event_import yso --keywords` warns: `RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead`. Use ArgumentParser instead of deprecated OptionParser in manageme...
events/management/commands/event_export.py <|code_start|>import os from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.utils.translation import activate, get_language from events.exporter.base import get_exporters class Comma...
events/management/commands/event_export.py <|code_start|>import os from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.utils.translation import activate, get_language from events.exporter.base import get_exporters class Comma...
API validation: require short description and description
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta from dateutil.parser import parse as dateutil_parse # django and drf from django.http import Http404 from ...
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta from dateutil.parser import parse as dateutil_parse # django and drf from django.http import Http404 from ...
Add photographer name field in Image model Required by the CC BY 4.0 license.
events/migrations/0028_add_photographer_name.py <|code_start|><|code_end|> events/models.py <|code_start|># -*- coding: utf-8 -*- """ Models are modeled after schema.org. When model is going to be serialized as JSON(-LD), model name must be same as Schema.org schema name, the model name is automatically published in @...
events/migrations/0028_add_photographer_name.py <|code_start|># -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-09-02 10:17 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0027_auto_20160819_12...
Use Helsinki servicemap in adding Place in LE admin
events/admin.py <|code_start|>from django.conf import settings from django.contrib import admin from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.gis import admin as geoadmin from django.contrib.gis.db import models from django.utils.translation import ugettext as _ from modeltranslati...
events/admin.py <|code_start|>from django.conf import settings from django.contrib import admin from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.gis.db import models from django.utils.translation import ugettext as _ from leaflet.admin import LeafletGeoAdmin from modeltranslation.admi...
YSO p12262 is deprecated Espoo importer fails when running `python manage.py event_import --events espoo` YSO term p12262 "lapset (kooste)" is deprecated on 26.05.2016 http://finto.fi/yso/fi/page/?uri=p12262 It is used here: https://github.com/City-of-Helsinki/linkedevents/blob/master/events/importer/espoo.py#L101 ...
events/importer/espoo.py <|code_start|># -*- coding: utf-8 -*- import re import time from datetime import datetime, timedelta import requests import bleach import dateutil.parser import pytz import requests_cache from django.utils.html import strip_tags from events.models import ( DataSource, Event, Keywo...
events/importer/espoo.py <|code_start|># -*- coding: utf-8 -*- import re import time from datetime import datetime, timedelta import requests import bleach import dateutil.parser import pytz import requests_cache from django.utils.html import strip_tags from events.models import ( DataSource, Event, Keywo...
Update DRF to 3.5 For schema generation support etc.
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta from dateutil.parser import parse as dateutil_parse # django and drf from django.http import Http404 from ...
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta from dateutil.parser import parse as dateutil_parse # django and drf from django.http import Http404 from ...
Prevent editing past events
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta from dateutil.parser import parse as dateutil_parse # django and drf from django.http import Http404 from ...
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta from dateutil.parser import parse as dateutil_parse # django and drf from django.http import Http404 from ...
Allow editing events from other organization data sources by organization users through API
events/admin.py <|code_start|>from django.conf import settings from django.contrib import admin from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.gis.db import models from django.utils.translation import ugettext as _ from leaflet.admin import LeafletGeoAdmin from modeltranslation.admi...
events/admin.py <|code_start|>from django.conf import settings from django.contrib import admin from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.gis.db import models from django.utils.translation import ugettext as _ from leaflet.admin import LeafletGeoAdmin from modeltranslation.admi...
Set publication_status to public by default Long running useless feature if there ever was one. Drafts may still be saved by specifying the status, if someone wishes to.
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta, timezone # django and drf from django.db.transaction import atomic from django.http import Http404 from d...
events/api.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals # python import base64 import re import struct import time import urllib.parse from datetime import datetime, timedelta, timezone # django and drf from django.db.transaction import atomic from django.http import Http404, HttpR...
Modify kulke importer to import courses
events/importer/base.py <|code_start|>import os import logging import itertools import datetime from collections import defaultdict import operator from django.conf import settings from rest_framework.exceptions import ValidationError from django.contrib.gis.geos import Point, Polygon from django.contrib.gis.gdal impo...
events/importer/base.py <|code_start|>import os import logging import itertools import datetime from collections import defaultdict import operator from django.conf import settings from rest_framework.exceptions import ValidationError from django.contrib.gis.geos import Point, Polygon from django.contrib.gis.gdal impo...
Fix CSRF middleware There is a [TODO in `settings.py` to 'fix the CSRF middleware'](https://github.com/CiviWiki/OpenCiviWiki/blob/dev/civiwiki/settings.py#L60). This issue is a placeholder to make sure we resolve the issue with CSRF middleware. What is the issue that prevents us from using CSRF?
civiwiki/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os from django.core.exceptions import ImproperlyConfigured import dj_database_url def get_env_variable(environment_variable, optional=F...
civiwiki/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os from django.core.exceptions import ImproperlyConfigured import dj_database_url def get_env_variable(environment_variable, optional=F...
Remove unused variables While scanning the project with Flake8 (#33), we received several errors related to **unused imports**. # Goal Resolve all Flake8 errors related to unused imports. # Task The following Flake8 errors should be resolved: - [x] ./api/read.py:156:9: F841 local variable 'user_categories' i...
project/api/write.py <|code_start|>import json, PIL, urllib, uuid from notifications.signals import notify # django packages from django.contrib.auth.models import User from django.http import JsonResponse, HttpResponse, HttpResponseServerError, HttpResponseForbidden, HttpResponseBadRequest from django.core.files imp...
project/api/write.py <|code_start|>import json, PIL, urllib, uuid from notifications.signals import notify # django packages from django.contrib.auth.models import User from django.http import JsonResponse, HttpResponse, HttpResponseServerError, HttpResponseForbidden, HttpResponseBadRequest from django.core.files im...
Add 'draft stage' for Threads Allow **threads** to be created as drafts. The **thread** should have an edit mode and preview. # Goal Give early adopters a basic tool to contribute content to CiviWiki. Allow authors to draft/edit their threads before publishing. # Task - [x] Add a field/metadata that allows a Th...
project/api/migrations/0024_remove_civi_links.py <|code_start|><|code_end|> project/api/migrations/0025_thread_is_draft.py <|code_start|><|code_end|> project/api/models/thread.py <|code_start|>from django.db import models from .account import Account from .category import Category from .fact import Fact from .hashtag i...
project/api/migrations/0024_remove_civi_links.py <|code_start|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0023_auto_20170615_0827'), ] operations = [ migrations...
Add UI to threads to toggle draft status Allow users to compose threads in draft status, and then toggle the draft status when ready to publish. # Task Add UI elements that: - [ ] Allow authors to toggle draft mode for their Thread entries - [ ] Ensure that authors can edit their Thread while in draft mode
project/api/write.py <|code_start|>import json, PIL, urllib, uuid from notifications.signals import notify # django packages from django.contrib.auth.models import User from django.http import JsonResponse, HttpResponse, HttpResponseServerError, HttpResponseForbidden, HttpResponseBadRequest from django.core.files im...
project/api/write.py <|code_start|>import json, PIL, urllib, uuid from notifications.signals import notify # django packages from django.contrib.auth.models import User from django.http import JsonResponse, HttpResponse, HttpResponseServerError, HttpResponseForbidden, HttpResponseBadRequest from django.core.files im...
Can't Publish New Thread I attempted to make a new thread on Civiwiki.org. I was able to create the content, but when I hit publish it throws a server error. ![image](https://user-images.githubusercontent.com/30572202/57983784-ba53aa00-7a23-11e9-8e32-a036612b47b3.png)
project/api/write.py <|code_start|>import json import PIL import urllib import uuid from notifications.signals import notify # django packages from django.db.models.query import F from django.contrib.auth.models import User from django.http import ( JsonResponse, HttpResponse, HttpResponseServerError, ...
project/api/write.py <|code_start|>import json import PIL import urllib import uuid from notifications.signals import notify # django packages from django.db.models.query import F from django.contrib.auth.models import User from django.http import ( JsonResponse, HttpResponse, HttpResponseServerError, ...
Can't Publish New Thread I attempted to make a new thread on Civiwiki.org. I was able to create the content, but when I hit publish it throws a server error. ![image](https://user-images.githubusercontent.com/30572202/57983784-ba53aa00-7a23-11e9-8e32-a036612b47b3.png)
project/api/write.py <|code_start|>import json import PIL import urllib import uuid from notifications.signals import notify # django packages from django.db.models.query import F from django.contrib.auth.models import User from django.http import ( JsonResponse, HttpResponse, HttpResponseServerError, ...
project/api/write.py <|code_start|>import json import PIL import urllib import uuid from notifications.signals import notify # django packages from django.db.models.query import F from django.contrib.auth.models import User from django.http import ( JsonResponse, HttpResponse, HttpResponseServerError, ...
Bug while creating a thread. **Description** In the event that you create a `superuser` through the terminal using `python manage.py createsuper` then you signup to create a new account. If you then login and try to create a new thread using the newly created account, you get an error `IntegrityError: insert or updat...
project/api/write.py <|code_start|>import json import PIL import urllib import uuid from notifications.signals import notify # django packages from django.db.models.query import F from django.contrib.auth.models import User from django.http import ( JsonResponse, HttpResponse, HttpResponseServerError, ...
project/api/write.py <|code_start|>import json import PIL import urllib import uuid from notifications.signals import notify # django packages from django.db.models.query import F from django.contrib.auth.models import User from django.http import ( JsonResponse, HttpResponse, HttpResponseServerError, ...
Remove Sentry as a barrier to development Our project currently will not start without configuring a SENTRY_ADDRESS. In general, development should be as quick and painless as possible -- and not be inhibited by production concerns. For the time being, since we are not in production, remove the dependency on Sentry....
project/civiwiki/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os import sentry_sdk import environ from django.core.exceptions import ImproperlyConfigured from sentry_sdk.integrations.django ...
project/civiwiki/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os import environ from django.core.exceptions import ImproperlyConfigured env = environ.Env( # set casting, default value ...
Remove django-environ We currently load environment variables using django-environ in settings.py. However, django-environment only supports Django up to around version 2. Since we aim to use the latest Django LTS (version 3.2 #848) we should remove django-environ. Remove django-environ and use `os.getenv` instead. ...
project/civiwiki/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os import environ from django.core.exceptions import ImproperlyConfigured env = environ.Env( # set casting, default value ...
project/civiwiki/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_H...
Moved webapp static templates to Django app Closes #905 Moved - `project/threads/templates/threads/partials/accounts` to `project/accounts/templates/accounts` - `/project/webapp/templates/` to `/project/threads/templates/threads/` Tested the application by creating a new account and loading the data. ...
project/api/write.py <|code_start|>import json import PIL import urllib import uuid from notifications.signals import notify # django packages from django.db.models.query import F from django.contrib.auth import get_user_model from django.http import ( JsonResponse, HttpResponse, HttpResponseServerError, ...
project/api/write.py <|code_start|>import json import PIL import urllib import uuid from notifications.signals import notify # django packages from django.db.models.query import F from django.contrib.auth import get_user_model from django.http import ( JsonResponse, HttpResponse, HttpResponseServerError, ...
Create reset password view under the accounts app. Currently, when the user wants to reset the password, they go to a Django admin page, which has a different look. Newly implemented registration and login views have been created under the '/accounts/' path. This task is to replace the current reset password page with...
project/accounts/views.py <|code_start|>""" Class based views. This module will include views for the accounts app. """ from django.conf import settings from django.views.generic.edit import FormView from django.contrib.auth import views as auth_views from django.contrib.auth import authenticate, login from django.co...
project/accounts/views.py <|code_start|>""" Class based views. This module will include views for the accounts app. """ from django.conf import settings from django.views.generic.edit import FormView from django.contrib.auth import views as auth_views from django.contrib.auth import authenticate, login from django.co...
Profile Error - partials/account/tabs/my_bills.html doesn't exist Internal Server Error: /profile/ani Error - django.template.exceptions.TemplateDoesNotExist: partials/account/tabs/my_bills.html I checked and found that my_bills.html was deleted in b600ead9fc563eef6086fb1c46120d71dba97703
project/api/models/civi.py <|code_start|>""" Civi Model The main model for Civi """ import os import json import datetime import math import uuid from calendar import month_name from django.core.files.storage import default_storage from django.core.serializers.json import DjangoJSONEncoder from django.db import model...
project/api/models/civi.py <|code_start|>""" Civi Model The main model for Civi """ import os import json import datetime import math import uuid from calendar import month_name from django.core.files.storage import default_storage from django.core.serializers.json import DjangoJSONEncoder from django.db import model...
Don't use general Exception class to catch exceptions `except Exception as e` is usually not considered a good practice. https://github.com/CiviWiki/OpenCiviWiki/blob/aa44eeb0e90944a229dc2fa35e83925c97e40e41/project/accounts/authentication.py#L165-L166 https://github.com/CiviWiki/OpenCiviWiki/blob/aa44eeb0e90944...
project/api/read.py <|code_start|>from django.contrib.auth import get_user_model from django.http import JsonResponse, HttpResponseBadRequest from django.forms.models import model_to_dict from .models import Account, Thread, Civi, Activity from .utils import json_response User = get_user_model() def get_user(reques...
project/api/read.py <|code_start|>from django.contrib.auth import get_user_model from django.http import JsonResponse, HttpResponseBadRequest from django.forms.models import model_to_dict from .models import Account, Thread, Civi, Activity from .utils import json_response User = get_user_model() def get_user(reques...
Restore SessionAuthenticationMiddleware We aim to move away from having a heavy JavaScript front-end, preferring instead to use Django templates (and sprinkles of JS where needed). This means we can use SessionAuthenticationMiddleware. This will also require restoring the default authentication classes in `settings....
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...
Create user profile template When migrating the old frontend templates to Django, we noticed the user profile was not rendering any content. Rather than weed through the proclaimed "horrendous code" that was responsible for rendering the BackBone view, let's just write a _simple_ user profile template from scratch. ...
project/accounts/api.py <|code_start|>from django.apps import AppConfig from rest_framework.viewsets import ModelViewSet from rest_framework.decorators import action from rest_framework.response import Response from api.permissions import IsAccountOwnerOrDuringRegistrationOrReadOnly from api.models import Thread from ...
project/accounts/api.py <|code_start|>from django.apps import AppConfig from rest_framework.viewsets import ModelViewSet from rest_framework.decorators import action from rest_framework.response import Response from api.permissions import IsAccountOwnerOrDuringRegistrationOrReadOnly from api.utils import get_account fr...
User object not retrieved. ### Description When I try running the project locally and I try registering a user, It shows an error. ### What should have happened? I expect the registration to work successfully. ### What browser(s) are you seeing the problem on? _No response_ ### Further details ...
project/accounts/forms.py <|code_start|>import re from django.core.files.images import get_image_dimensions from django import forms from django.contrib.auth.forms import ( SetPasswordForm, PasswordResetForm as AuthRecoverUserForm, ) from django.forms.models import ModelForm from django.contrib.auth import get_...
project/accounts/forms.py <|code_start|>import re from django.core.files.images import get_image_dimensions from django import forms from django.contrib.auth.forms import ( SetPasswordForm, PasswordResetForm as AuthRecoverUserForm, ) from django.forms.models import ModelForm from django.contrib.auth import get_...
Profile Page is showing Server Error (500) ### Description As we click on the button to navigate towards profile section of the site it throws a Server error (500) although the user is logged in. Here are logs the logs for the same. ``` Internal Server Error: /profile AttributeError at /profile 'Profile' object...
project/api/permissions.py <|code_start|>from rest_framework.permissions import BasePermission, SAFE_METHODS from .utils import get_account class IsOwnerOrReadOnly(BasePermission): """ Custom API permission to check if request user is the owner of the model """ def has_object_permission(self, request, view, ...
project/api/permissions.py <|code_start|>from rest_framework.permissions import BasePermission, SAFE_METHODS from .utils import get_account class IsOwnerOrReadOnly(BasePermission): """ Custom API permission to check if request user is the owner of the model """ def has_object_permission(self, request, view, ...
Bad Migration Tree ### Description When I was trying to squash migrations of the api , there seems to be an issue related to the whole ancestry of migrations, I am working on this as a part of #1017. The parent tree appears to be slightly displaced which I'll be looking forward to patch with the other issue mention...
project/api/migrations/0001_squashed_0029_civi_linked_bills.py <|code_start|><|code_end|>
project/api/migrations/0001_squashed_0029_civi_linked_bills.py <|code_start|># Generated by Django 3.2.7 on 2021-09-20 08:23 import common.utils from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): replaces = [('api', '...
Move forms from `api/forms.py` to the `accounts/forms.py` ## Idea summary There are several account/profile forms defined in [`api/forms.py`](https://github.com/CiviWiki/OpenCiviWiki/blob/develop/project/api/forms.py). Those forms should be moved to [`accounts/forms.py`](https://github.com/CiviWiki/OpenCiviWiki/blob...
project/api/forms.py <|code_start|>from django import forms from django.core.files.images import get_image_dimensions from django.contrib.auth import get_user_model from accounts.models import Profile class UpdatePassword(forms.ModelForm): """ Form for updating User Password """ class Meta: m...
project/api/forms.py <|code_start|><|code_end|>
{FEAT}: Automated testing with actions. ### Idea summary Usage of GitHub actions. ### Further details We can use GitHub Actions to check/test the code that is being pushed upstream via PRs and it can be tested before merging automatically (Technically it is Continuous Integration).
project/accounts/models.py <|code_start|>from django.contrib.auth.models import AbstractUser import os import io from django.core.files.storage import default_storage from django.conf import settings from django.db import models from PIL import Image, ImageOps from django.core.files.uploadedfile import InMemoryUploaded...
project/accounts/models.py <|code_start|>from django.contrib.auth.models import AbstractUser import os import io from django.core.files.storage import default_storage from django.conf import settings from django.db import models from PIL import Image, ImageOps from django.core.files.uploadedfile import InMemoryUploaded...
When uploading a profile image failed then user needs to go back and click on Edit Profile again to upload new image When users uploading a profile picture and this failed with the error message "Please use an image that 1280 x 960 pixels or smaller" then users need to go back to the profile and click on Edit Profile a...
project/accounts/admin.py <|code_start|>from django.contrib import admin # Register your models here. <|code_end|> project/accounts/models.py <|code_start|>from django.contrib.auth.models import AbstractUser import os import io from django.core.files.storage import default_storage from django.conf import settings from...
project/accounts/admin.py <|code_start|>from django.contrib import admin from .models import User # Register your models here. admin.site.register(User) <|code_end|> project/accounts/models.py <|code_start|>from django.contrib.auth.models import AbstractUser import os import io from django.core.files.storage import d...
Move user/account-related templates out of `threads` app ### Idea summary There are several user- and account-related templates in the `threads` app. They should reside in the `accounts` app instead. ### Further details Move all of the following templates from the `threads` app to the `accounts` app: - [ ] ...
project/accounts/views.py <|code_start|>""" Class based views. This module will include views for the accounts app. """ from django.conf import settings from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic.edit import FormView, UpdateView from django.views import View from django.contri...
project/accounts/views.py <|code_start|>""" Class based views. This module will include views for the accounts app. """ from django.conf import settings from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic.edit import FormView, UpdateView from django.views import View from django.contri...
Move static templates/dependencies to `core` app ### Idea summary We have several static templates and dependencies that are used across all apps. As common dependencies, these assets should be moved to the `core` app. ### Further details Move the following static templates/dependencies to the `core` app. - [x] `...
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...
Migrate threads urls to path in `threads` app, we need to change `url()` function with `path()` function as discussed in #1066 https://github.com/CiviWiki/OpenCiviWiki/blob/d7f24fad7c0a2565da3bf2cd54e89a847d7479dd/project/threads/urls.py#L19-L41 Conversion to [path](https://github.com/CiviWiki/OpenCiviWiki/blob/...
project/threads/urls.py <|code_start|>from django.conf.urls import include, url from rest_framework.routers import DefaultRouter from .api import (create_civi, delete_civi, edit_civi, edit_thread, get_civi, get_thread, rate_civi, upload_civi_image, new_thread, get_civis, get_respons...
project/threads/urls.py <|code_start|>from django.conf.urls import include from django.urls import path from rest_framework.routers import DefaultRouter from .api import (create_civi, delete_civi, edit_civi, edit_thread, get_civi, get_thread, rate_civi, upload_civi_image, new_thread, get_civis, ...
Migration of frontend_views ### Idea summary Elaboration of issue #1070 ### Further details As mentioned in issue #1070, we need to migrate from ```py url(r"^") ``` to ```py path() ``` And for frontend_views the following points need to be kept in mind - [ ] usage of django.urls module for path and includ...
project/frontend_views/urls.py <|code_start|>from django.conf.urls import url from . import views as v urlpatterns = [ url(r"^about$", v.about_view, name="about"), url(r"^support_us$", v.support_us_view, name="support us"), url(r"^howitworks$", v.how_it_works_view, name="how it works"), url(r"^profile/...
project/frontend_views/urls.py <|code_start|>from django.urls import path from frontend_views import views urlpatterns = [ path("about/", views.about_view, name="about"), path("support_us/", views.support_us_view, name="support us"), path("howitworks/", views.how_it_works_view, name="how it works"), pa...
[BUG]: FrontEnd routing issues ### Description The header in the application routes the application incorrectly and needs to be fixed. If it routes the anchor tag incorrectly, we'll be having a nested routes tree of /page1/page2/... ### What should have happened? Its end output must be like this ```html <...
project/frontend_views/urls.py <|code_start|>from django.urls import path from frontend_views import views urlpatterns = [ path("about/", views.about_view, name="about"), path("support_us/", views.support_us_view, name="support us"), path("howitworks/", views.how_it_works_view, name="how it works"), pa...
project/frontend_views/urls.py <|code_start|>from django.urls import path from frontend_views import views urlpatterns = [ path("about/", views.about_view, name="about"), path("support_us/", views.support_us_view, name="support_us"), path("howitworks/", views.how_it_works_view, name="how_it_works"), pa...
Make `linked_civis` and `response_civis` fields optional on Civi model The `Civi` model contains two required fields that are causing difficulty when starting a fresh project: - `linked_civis` https://github.com/CiviWiki/OpenCiviWiki/blob/85cd5bf867be4e1987cff3f083fc456904287f9e/project/threads/models.py#L214 - `re...
project/threads/migrations/0002_auto_20211006_1929.py <|code_start|># Generated by Django 3.2.7 on 2021-10-06 19:29 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depe...
project/threads/migrations/0002_auto_20211012_2014.py <|code_start|># Generated by Django 3.2.7 on 2021-10-12 14:44 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depe...
Consolidate Backbone templates for comprehension We are beginning the process of porting Backbone templates to the Django template syntax. However, the Backbone templates are often spread across multiple "partial" files, where a single Backbone model is applied against several combined template fragments. In order t...
project/accounts/views.py <|code_start|>""" Class based views. This module will include views for the accounts app. """ from core.custom_decorators import full_profile, login_required from django.conf import settings from django.contrib.auth import get_user_model, login from django.contrib.auth import views as auth_v...
project/accounts/views.py <|code_start|>""" Class based views. This module will include views for the accounts app. """ from core.custom_decorators import full_profile, login_required from django.conf import settings from django.contrib.auth import get_user_model, login from django.contrib.auth import views as auth_v...
[BUG] Fix Bugs when profile is being viewed ### Description The serialization is not correct when the registered user tries to view their own profile This comes from the serialization part of our code-base which can be viewed [here](https://github.com/CiviWiki/OpenCiviWiki/blob/develop/project/threads/views.py#...
project/accounts/views.py <|code_start|>""" Class based views. This module will include views for the accounts app. """ from core.custom_decorators import full_profile, login_required from django.conf import settings from django.contrib.auth import get_user_model, login from django.contrib.auth import views as auth_v...
project/accounts/views.py <|code_start|>""" Class based views. This module will include views for the accounts app. """ from core.custom_decorators import full_profile, login_required from django.conf import settings from django.contrib.auth import get_user_model, login from django.contrib.auth import views as auth_v...
Refactor function-based view to class-based ### Idea summary Rewrite function-based view to class-based and add docstring ### Further details In the accounts app's view, there is a function-based view called user_profile: ```python @login_required @full_profile def user_profile(request, username=None): if ...
project/accounts/urls/urls.py <|code_start|>from django.urls import path from django.contrib.auth import views as auth_views from accounts.views import ( RegisterView, SettingsView, ProfileActivationView, PasswordResetView, PasswordResetDoneView, PasswordResetConfirmView, PasswordResetComple...
project/accounts/urls/urls.py <|code_start|>from django.urls import path from django.contrib.auth import views as auth_views from accounts.views import ( RegisterView, SettingsView, ProfileActivationView, PasswordResetView, PasswordResetDoneView, PasswordResetConfirmView, PasswordResetComple...
Update Django to 4.0.1 We need to update Django to 4, i.e. the latest version, in this project. Otherwise, security checks fail. - [ ] Change requirements file to include Django 4 - [ ] Make modifications to run the project with Django 4
project/accounts/forms.py <|code_start|>import re from django.core.files.images import get_image_dimensions from django import forms from django.forms.models import ModelForm from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _ from .reserved_usernames import RESERVED_U...
project/accounts/forms.py <|code_start|>import re from django.core.files.images import get_image_dimensions from django import forms from django.forms.models import ModelForm from django.contrib.auth import get_user_model from django.utils.translation import gettext_lazy as _ from .reserved_usernames import RESERVED_US...
Account Deletion. There seems to be no way to delete accounts as yet ## Task - [ ] sketch and discuss the "delete my account" user interface design - [ ] implement the design as an HTML template - [ ] create a Django view to render the HTML template - [ ] define a `POST` handler for the Django view that soft-d...
project/accounts/api.py <|code_start|>from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404 from django.http import ( JsonResponse, HttpResponse, HttpResponseServerError, HttpResponseForbidden, HttpResp...
project/accounts/api.py <|code_start|>from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404 from django.http import ( JsonResponse, HttpResponse, HttpResponseServerError, HttpResponseForbidden, HttpResp...
disable auto-named migration ## Task - [ ] create a file `project/core/management/commands/makemigrations.py` with the following content ```py from django.core.management.base import CommandError from django.core.management.commands.makemigrations import ( Command as BaseCommand, ) class Command(Base...
project/core/management/commands/makemigrations.py <|code_start|><|code_end|>
project/core/management/commands/makemigrations.py <|code_start|> from django.core.management.base import CommandError from django.core.management.commands.makemigrations import ( Command as BaseCommand, ) class Command(BaseCommand): def handle(self, *app_labels, name, dry_run, merge, **options): if n...
Update grammar in contributing guide ### Idea summary Improve the grammar in our contributing guide with an automated grammar checker. ### Further details _No response_
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...
enable Rich terminal output ## Task - [ ] add Rich to this project with the command `poetry add rich --group dev` - [ ] follow the Rich [configuration instructions](https://rich.readthedocs.io/en/stable/introduction.html) - [ ] add the following code to the `LOGGING = {...}` configuration in the project settings ...
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...
project/core/settings.py <|code_start|>""" Django settings for civiwiki project. Darius Calliet May 12, 2016 Production settings file to select proper environment variables. """ import os # False if not in os.environ DEBUG = os.getenv("DEBUG", False) # defaults to second value if not found in os.environ DJANGO_HOST ...