Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
post() got an unexpected keyword argument 'uidb64' Reset password rest_auth
now i work on reset password with rest_auth what ever the email be sent and url be open like this : This is the page when i click on url sent in email and after the fill the fields and make a post request i get this : This is the error i get and here is my urls : urlpatterns = [ path('', include('rest_auth.urls')), path('login/', LoginView.as_view(), name='account_login'), path('registration/', include('rest_auth.registration.urls')), path('registration/', RegisterView.as_view(), name='account_signup'), re_path(r'^account-confirm-email/', VerifyEmailView.as_view(), name='account_email_verification_sent'), re_path(r'^account-confirm-email/(?P<key>[-:\w]+)/$', VerifyEmailView.as_view(), name='account_confirm_email'), re_path(r'^password/reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', PasswordResetConfirmView.as_view(), name='password_reset_confirm') ] -
Django migrate sqlite3 db to postgres Query invalid input syntax for integer: "none" error
My project use Django 2.0 database from sqlite migrate to postgresql 9.6.3, Run normal in sqilet, migrate to postgresql and running error. models.py : Class WechatPay(models.Model): user = models.CharField('网点', max_length=20, default='None') user_group = models.CharField('渠道', max_length=20, default='None') total_fee = models.FloatField('订单金额', default=0, decimal_places=0, max_digits=7) card_sale = models.FloatField('售卡款', default=0, decimal_places=0, max_digits=7) card_recharge = models.FloatField('充值款', default=0, decimal_places=0, max_digits=7) trade_date = models.DateField('交易日期', auto_now_add=True) views.py : def group_list(request): start_time = request.GET.get('start_time', datetime.today().strftime("%Y-%m-%d")) end_time = request.GET.get('end_time', datetime.today().strftime("%Y-%m-%d")) object_list = WechatPay.objects.values('user', 'trade_date', 'user_group').filter( trade_date__gte=start_time).filter( trade_date__lte=end_time).filter( status='SUCCESS').annotate( card_sale=Cast(Sum('card_sale'), DecimalField(decimal_places=2)), total_fee=Cast(Sum('total_fee'), DecimalField(decimal_places=2)), card_recharge=Cast(Sum('card_recharge'), DecimalField(decimal_places=2)) ).order_by('-trade_date') summary = WechatPay.objects.filter( trade_date__gte=start_time).filter( trade_date__lte=end_time).filter( status='SUCCESS').aggregate(card_sale_sum=Cast(Sum('card_sale'), DecimalField(decimal_places=2)), total_fee_sum=Cast(Sum('total_fee'), DecimalField(decimal_places=2)), card_recharge_sum=Cast(Sum('card_recharge'), DecimalField(decimal_places=2))) return render(request, 'wechatpay/data-group.html', {'items': object_list, 'start_time': start_time, 'end_time': end_time, 'summary': summary}) error: Traceback (most recent call last): File "D:\workspace\venv\venv-django\lib\site-packages\django\db\backends\utils.py", line 85, in _execute return self.cursor.execute(sql, params) psycopg2.DataError: invalid input syntax for integer: "none" LINE 1: ...LECT SUM("gft_wechat_pay_wechatpay"."card_sale")::numeric(No... ^ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "D:\workspace\venv\venv-django\lib\site-packages\django\core\handlers\exception.py", line 35, in inner response = get_response(request) File "D:\workspace\venv\venv-django\lib\site-packages\django\core\handlers\base.py", line 128, in _get_response response = self.process_exception_by_middleware(e, request) File "D:\workspace\venv\venv-django\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "D:\workspace\venv\venv-django\lib\site-packages\django\contrib\auth\decorators.py", line 21, in _wrapped_view return view_func(request, *args, **kwargs) File "D:\workspace\weixin_pay\gft_web\gft_wechat_pay\views.py", line 249, in group_list card_recharge_sum=Cast(Sum('card_recharge'), DecimalField(decimal_places=2))) File "D:\workspace\venv\venv-django\lib\site-packages\django\db\models\query.py", … -
Update model fields based on POST data before save with Django Rest Framework
I'm using django-rest-framework and want to augment the posted data before saving it to my model as is normally achieved using the model's clean method as in this example from the django docs: class Article(models.Model): ... def clean(self): # Don't allow draft entries to have a pub_date. if self.status == 'draft' and self.pub_date is not None: raise ValidationError(_('Draft entries may not have a publication date.')) # Set the pub_date for published items if it hasn't been set already. if self.status == 'published' and self.pub_date is None: self.pub_date = datetime.date.today() Unfortunately a django-rest-framework Serializer does not call a model's clean method as with a standard django Form so how would I achieve this? -
Django: create database user on user-create
I need to implement a functionality that creates a postgres DB-user when a django-user is created in the admin interface (DB-user should have same username and password). I figured out that I could use Signals to execute a script when a user is created, but the problem is I cannot get the raw password of the user. So is there a way to get the raw password of a django user in this context? And if not, what would be the best way to implement this functionality? -
raise forms.ValidationError not working in custom template form
I have a custom template forms {% extends 'accounts/registration/base.html' %} {% block content %} {% load bootstrap3 %} <div class="container"> ` `<h1>Sign Up</h1> <form method="POST"> {{form.non_field_errors}} {% csrf_token %} <br> <input type="email" name="email" value="email"> <input type="text" name="phonenumber" value="phonenumber"> <input type="text" name="name" value="name"> <input type="password" name="password1" value="password1"> <input type="password" name="password2" value="password2"> <input type="text" name="alternavite_mobile_number" value=""> <input type="submit" class="btn btn default" value="SignUp"> </form> </div> {% endblock %} Here is my views.py file def user_signup(request): registered =False if request.POST: user_form = UserSignupForm(data=request.POST) user_pro_form = UserProfileSignupForm(data=request.POST) if user_pro_form.is_valid() and user_form.is_valid(): user = user_form.save() user.set_password(user.password) user.save() user_pro = user_pro_form.save(commit=False) user_pro.user = user user_pro.save() registered = True else: raise forms.ValidationError(user_form.errors,user_pro_form.errors) else: user_form = UserSignupForm() user_pro_form = UserProfileSignupForm() return render(request,'accounts/registration/customer_signup.html') what i am getting ValidationError at /accounts/signup/ {'password2': ["Passwords don't match"], 'phonenumber': ['Enter a valid phone number.']} Request Method: POST Request URL: http://127.0.0.1:8000/accounts/signup/ Django Version: 2.0.1 Exception Type: ValidationError Exception Value: {'password2': ["Passwords don't match"], 'phonenumber': ['Enter a valid phone number.']} This is not raising error in form at instance, but on error page showing that form validation error, can you suggest me how to do it and if another simple way to use custom form template. -
Django - Website runs on localhost, returns NoReverseMatch on Ubuntu server
I'm running a project online using Django, Gunicorn and Nginx. I am currently trying to update the website by adding new URL patterns and pages for the user to view. However, this return a NoReverseMatch error whilst online, yet locally, Django doesn't return any errors. The error only occurs when the HTML file calls a namespace which I have added recently (i.e. this URL was not in the initial deployment of the website). NoReverseMatch at / Reverse for 'team' not found. 'team' is not a valid view function or pattern name. Though I have clearly specified this url and view function in the files. Thanks! -
How to clean a model form in Django?
Can someone please explain to me how I can clean all of my fields and show a custom error_message and do all of my validations on the fields ? I know how to do it with a normal Form but I do not get it how to do it with the subclass ModelForm. In my opinion there should be shown a ValidationError for title with the following code but nothing seems to happen. forms.py class AdvertisementForm(forms.ModelForm): title = forms.CharField(label="Titel", max_length=200, required=False) description = forms.CharField(label="Beschreibung", max_length=1000, widget=forms.Textarea) images = forms.ImageField( label="Weitere Bilder(max. 5)", widget=forms.ClearableFileInput( attrs={'multiple': True}) ) class Meta: model = Advertisement title, description = "title", "description" price, category = "price", "category" main_image, images = "main_image", "images" fields = [title, description, price, category, main_image, images] def clean(self): cleaned_data=super(AdvertisementForm, self).clean() title = self.cleaned_data.get("title") if not title: raise forms.ValidationError("Error") return cleaned_data views.py def advertisement_view(request): form = AdvertisementForm(request.POST or None, request.FILES or None) if form.is_valid(): print("valid") instance = form.save(commit=False) main_image = request.FILES.get("main_image") user = User.objects.get(id=request.user.id) instance.user = user instance.main_image = main_image instance.save() images = request.FILES.getlist('images') image_count = len(images) if image_count > 5: image_count = 5 for i in range(0, image_count): Image.objects.create(owner=instance, image=images[i]) return redirect("/profil/%d/" % request.user.id) else: context = { 'form': form } return … -
How to get a property from a Django model?
class Jornal(models.Model): url = models.URLField(unique = True,blank=True) name = models.CharField(max_length=100) def __str__(self): return self.name @property def domain(self): return urlparse(self.url).netloc How to I get the Jornal object through its domain? I was trying this in the shell: domain = "www.example.com" obj = Jornal.objects.get_domain(domain) and then this: domain = "www.example.com" obj = Jornal.objects(domain = domain) But none works. -
Customize Status code response from Django Rest Framework serializer
The scenario is quite straight-forward: Say i have a user model where email should be unique. I did a custom validation for this like. def validate_email(self, value): if value is not None: exist_email = User.objects.filter(email=value).first() if exist_email: raise serializers.ValidationError("This Email is already taken") return value from rest_framework response when input validation occur we should return status_code_400 for BAD_REQUEST but in this scenario we should or we need to return status_code_409 for conflicting entry. What is the best way to customize status_code response from serializer_errors validation. -
Getting human-readable value from Django's ChoiceField when nested in an ArrayField
To obtain the human readable value for a field with choices, Django provides the get_FOO_display() method. How would one go about getting the human readable values when the field is inside an ArrayField? eg: foo_array = models.ArrayField(models.CharField(choices=choices)) -
Error after posting new data to the web server
It all looks good by when i try to add some post to my topic I have an error created_by=user : Here is my forms.py from django import forms from .models import Topic class NewTopicForm(forms.ModelForm): message = forms.CharField( widget=forms.Textarea( attrs={'rows': 5, 'placeholder': 'What is on your mind?'} ), max_length=40000, help_text='The max length of the text is 4000.') class Meta: model = Topic fields = ['subject', 'message'] and my view function for this form: def new_topic(request, pk): board = get_object_or_404(Board, pk=pk) user = User.objects.first() if request.method == 'POST': form = NewTopicForm(request.POST) if form.is_valid(): topic = form.save(commit=False) topic.board = board topic.starter = user topic.save() post = Post.objects.create( message=form.cleaned_data.get('message'), topic=topic, created_by=user ) return redirect('board_topics', pk=board.pk) else: form = NewTopicForm() return render(request, 'new_topic.html', {'board': board, 'form': form}) -
Cannot interpret feed_dict key as Tensor: Tensor Tensor("Placeholder:0", shape=(5, 5, 1, 32), dtype=float32) is not an element of this graph
I made a predictive audio using python tensorflow, when the first upload file was successful but if I repeat it again an error message like this appears Cannot interpret feed_dict key as Tensor: Tensor Tensor("Placeholder:0", shape=(5, 5, 1, 32), dtype=float32) is not an element of this graph. whether it contains cookies? def creatematrix(request): if request.method == 'POST': myfile = request.FILES['sound'] fs = FileSystemStorage() filename = fs.save(myfile.name, myfile) uploaded_file_url = fs.url(filename) # load json and create model json_file = open('TrainedModels/model_CNN.json', 'r') loaded_model_json = json_file.read() json_file.close() loaded_model = model_from_json(loaded_model_json) # load weights into new model loaded_model.load_weights("TrainedModels/model_CNN.h5") print("Model restored from disk") sound_file_paths = myfile.name # "22347-3-3-0.wav" parent_dir = 'learning/static/media/' sound_names = ["air conditioner","car horn","children playing","dog bark","drilling","engine idling","gun shot","jackhammer","siren","street music"] predict_file = parent_dir + sound_file_paths predict_x = extract_feature_array(predict_file) test_x_cnn = predict_x.reshape(predict_x.shape[0], 20, 41, 1).astype('float32') loaded_model.compile(loss='categorical_crossentropy', optimizer='rmsprop', metrics=['accuracy']) # generate prediction, passing in just a single row of features predictions = loaded_model.predict(test_x_cnn) # get the indices of the top 2 predictions, invert into descending order ind = np.argpartition(predictions[0], -2)[-9:] ind[np.argsort(predictions[0][ind])] ind = ind[::-1] a = sound_names[ind[0]], 100 * round(predictions[0,ind[0]],3) b = sound_names[ind[1]], 100 * round(predictions[0,ind[1]],3) c = sound_names[ind[2]], 100 * round(predictions[0,ind[2]],3) d = sound_names[ind[3]], 100 * round(predictions[0,ind[3]],3) e = sound_names[ind[4]], 100 * round(predictions[0,ind[4]],3) f = … -
Static and Media Files in Django 1.10
I have a ImageField in my user_accounts/models.py file which i use to store the profile picture of users.It has a upload_to field which calls a function and uploads the file to a media folder in myproj/media/.. . The Image Field also has a default field which is used to set the default profile image from the static folder. This is an entry of User Table in development server. In The image the avatar field shows static url but when clicked it /media/ gets attached to the url before /static/ as follows: In The image the url bar shows /media/ attached before the static url.When i manually remove the /media/ from the url the defaultProfileImage is shown. This is my project structure |-myproj |-myproj |-__init__.py |-settings.py |-urls.py |-wsgi.py |-static |-user_accounts |-images |-defaultrofileImage.png |-user_accounts |-__init__.py |-models.py |-admin.py |-tests.py |-views.py |-urls.py Models.py File from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import AbstractUser def get_upload_url(instance , filename): return 'userProfileImages/%s/%s'%(instance.username , filename) class User(AbstractUser): mobileNumber = models.IntegerField(blank = True , null = True) avatar = models.ImageField(upload_to = get_upload_url , default = '/static/user_accounts/images/defaultProfileImage.png') def __str__(self): return self.username I have the following lines added in my settings.py file AUTH_USER_MODEL = 'user_accounts.User' STATIC_URL = '/static/' … -
Django - Not able to set view using a front end folder which is outside app folder structure
I am new to Django , i have learnt most the basics in framework in past one month .I have deployed my application from local to an online server .The REST APIs are working fine but now I am not able to access my front end code on that server because Django is on the server's root . There is sepration of concerns between server and front end code so I had developed my UI by not worrying about directory structure as per Django ( for example static file confiuration etc. ) Now I want to use Django on local server's root and access my /front-end/html/index.html as home page . Please see all code and directory strcture as follows with error : I am always getting following error : TemplateDoesNotExist at / index.html Request Method: GET Request URL: http://localhost:8000/ Django Version: 2.0 Exception Type: TemplateDoesNotExist Exception Value: index.html Exception Location: C:\Users\didi\Envs\wantedly_virtual_env\lib\site-packages\django\template\loader.py in select_template, line 47 Python Executable: C:\Users\didi\Envs\wantedly_virtual_env\Scripts\python.exe Python Version: 3.6.3 My urls.py file is as follows : urlpatterns = [ path('admin/', admin.site.urls), url(r"^$", TemplateView.as_view(template_name='index.html')), url(r'^rest-auth/', include('rest_auth.urls')), url(r'^rest-auth/registration/', include('rest_auth.registration.urls')), url(r'^rest-auth/login/', include('rest_auth.registration.urls')), url(r'^refresh-token/', refresh_jwt_token), url(r'^user/$', DetailsView.as_view(), name='rest_user_details'), url(r'^', include('api.urls')), url(r'^api/v1/skills/$', wantedly_app_views.skill_collection), url(r'^api/v1/skills/(?P<pk>[0-9]+)$', wantedly_app_views.skill_element), url(r'^api/v1/user/skills/(?P<pk>[0-9]+)$', wantedly_app_views.user_skill_collection), url(r'^api/v1/user/skill/upvotes/(?P<pk>[0-9]+)$', wantedly_app_views.user_skill_upvotes), ] My settings.py contains … -
django - how to retrieve data from database?
I really don't understand the documentation on retrieving data from database, this is what I've tried account_from_validation = AwaitingValidation.objects.filter(av_hash = acchash) test = account_from_validation['email'] But I get "No exception message supplied" This is acchash: path('confirm-email/<str:acchash>/', views.ConfirmEmail), I store a random hash in database which if accessed from the confirm-email link will confirm the email and register the account. But I don't know how to retrieve that information from database. -
Django using one time call function output as global value
While initializing the project, i want to call login function from projects settings for once and use the output token anywhere in project. I want to use same token whether I call again to check if token changed. def login(creds): r = requests.post(base_url + '/api/admin/login', json=creds, headers=headers, verify=False) if r.status_code == 200: token = r.json()['token'] return token If i call function in project settings, function starts each time. I don't want to dump token to a file and read each time. Any other way? Thanks. -
Django2,Page not found,but it exits
enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here I really do not know where the problem, the first page can be displayed, click on the link to die, watch the video tutorial, but the teacher can, which can help out to see where the problem lies? -
Need help for creating new record if its a new year in django
I am new to python. I really like Django. I wanted to create an application for an NGO to keep track of kids. We will have kid details given by NGO. We will create a form that takes the health details of the kid. If they try to fill the form with in this year, the same data should get update. If it another year then it needs to create a new data of that year. I have tried my level best. The form only updates but doesn't create a new one. Any help would be great. I am trying to show the details of the kid and prefill the form if data exists. Posting my code. Here is the model. class StudentsProfileInfo(models.Model): SCHOOL_UID = models.ForeignKey(SchoolUID) CHILD_NAME= models.CharField(max_length=245) CHILD_UID = models.CharField(max_length=245) SEX = models.CharField(max_length=245) DOB = models.DateField(max_length=245) AGE = models.IntegerField() FATHERS_NAME = models.CharField(max_length=245) FATHERS_EMAIL = models.EmailField(max_length=245) FATHERS_NUMBER = models.IntegerField() MOTHERS_NAME = models.CharField(max_length=245) MOTHERS_EMAIL = models.EmailField(max_length=245) MOTHER_NUMBER = models.IntegerField() ADDRESS = models.CharField(max_length=245) CITY = models.CharField(max_length=245) SECTION_AND_CLASS = models.CharField(max_length=245) TEACHERS_NAME = models.CharField(max_length=245) TEACHERS_EMAIL =models.EmailField(max_length=245) def __str__(self): return self.CHILD_NAME class Anthropometry(models.Model): KID_DETAILS = models.CharField(max_length=245) HEIGHT = models.IntegerField() WEIGHT = models.IntegerField() BMI= models.CharField(max_length=245) HEAD_CIRCUMFERENCE = models.IntegerField() MID_UPPER_ARM_CIRCUMFERENCE = models.IntegerField() TRICEP_SKIN_FOLDNESS= models.IntegerField() BSA = models.CharField(max_length=245) … -
How can I get the `content_type` in the Model `save` method?
I have the field: image = models.ImageField(upload_to=file_upload_to) How can I get the content_type and just 'filename' in the Model save method ? I know I can get it in the form, but the situation is more complex(custom formset for user, need to change also in admin, plus some celery task) and is better if I can get it on the model. -
How do i implement sorting and filtering in django?
I'm pretty new to django and i am working on a project where i need to let users sort or filter listed results by brand or manufacturer and sort using prices(highest to lowest or vice versa).How should i approach this problem? -
Recover GET parameter from PasswordResetConfirmView
I'm trying to recover a GET parameter from the django template view django.contrib.auth.PasswordResetConfirmView. Basically when a user click on his password reset link (like http://127.0.0.1:8000/commons/reset/MQ/4t8-210d1909d621e8b4c68e/?origin_page=/mypage/) I want to be able to retrieve the origin_page=/mypage/ argument. So far my url.py looks like this: from django.urls import path from . import views app_name = 'commons' urlpatterns = [ path('reset/<uidb64>/<token>/', views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'), ] And my views.py like this: from django.contrib.auth import views as auth_views class PasswordResetConfirmView(auth_views.PasswordResetConfirmView): template_name = 'commons/password_reset_confirm.html' success_url = '/commons/reset/done/' def get(self, request, *args, **kwargs): self.extra_context = { 'origin_page': self.request.GET['origin_page'] } return super().get(request, *args, **kwargs) As you can see I'm trying to get my origin_page with 'origin_page': self.request.GET['origin_page'] but it doesn't work. It throws me a MultiValueDictKeyError. I even used the debugger to inspect every objects from the class/method but none of them seems to contains my origin_page variable. Any idea? Thanks -
How to introduce non-model, write-only field to a modelserializer
I have the following ModelSerializer: class MaintProtoSerializer(serializers.ModelSerializer): class Meta: model = MaintenanceProtocol fields= ('warranty_card_number', 'warranty_id', 'machine_id', 'inner_body_id', 'outter_body_id', 'warranty', 'date', 'seller', 'inner_cleanup', 'outter_cleanup', 'turbine_cleanup', 'filter_condition', 'pressure', 'outer_air_temp', 'inlet_air_temp', 'other_problems', 'propuski', 'client_notes', 'electricity') and its model: class MaintenanceProtocol(models.Model): warranty_card_number = models.CharField(max_length=100) warranty_id = models.CharField(max_length=100) machine_id = models.CharField(max_length=100) inner_body_id = models.CharField(max_length=100) outter_body_id = models.CharField(max_length=100) warranty = models.BooleanField() date = models.DateField() seller = models.CharField(max_length=100) inner_cleanup = models.BooleanField() outter_cleanup = models.BooleanField() turbine_cleanup = models.BooleanField() filter_condition = models.TextField() pressure = models.IntegerField() outer_air_temp = models.IntegerField() inlet_air_temp = models.IntegerField() other_problems = models.TextField() electricity = models.IntegerField() propuski = models.TextField() client_notes = models.TextField() It's deserializing an object based on the following json passed to it: { "warranty_card_number": "profi-1234", "warranty_id": "fji-0938", "machine_id": "fuji", "inner_body_id": "outter-2349", "outter_body_id": "inner-2349", "warranty": "yes", "date": "2017-12-20", "seller": "maga`zin", "inner_cleanup": "no", "outter_cleanup": "yes", "turbine_cleanup": "yes", "filter_condition": "so-so", "pressure": "4", "outer_air_temp": "5", "inlet_air_temp": "23", "electricity": "45", "propuski": "some", "other_problems": "none", "client_notes": "n/a", "sigb64": "alkjhsdfpas8df,a;lsejf,p0394" } So the sigb64 field is not really part of the model (and it mustn't be persisted to the database), however I'd like to access it from the created model by the serializer. What's the correct way to achieve that? -
Access data from other model in a ListView
Good morning, how can I access data from another model in my ListView ? Right now I have a model called Project and I I am using ListView in order to render a a list of all current projects. My Project is linked to another models call Team that has multiple Members and each members has an attribute called Response_set. I would like that in my HTML template if Response_set is not empty for each member put a Green Mark else put a red mark. The thing is I do not know and do not find the answer on how to loop through my list within the view; class HRIndex(generic.ListView): #import pdb; pdb.set_trace() template_name = "HR_index.html" model = Project ordering = ['-created_at'] def get_context_data(self, **kwargs): import pdb; pdb.set_trace() context = super(HRIndex,self).get_context_data(**kwargs) status_dict = {} for project in object_list: proj_team_id = project.team_id proj_memb = proj_team_id.members.all() open_close = 1 for memb in proj_memb: if not list(memb.response_set.all()): status = False else: status = True open_close = open_close*status status_dict.update({project.id:open_close}) context['status_dict'] = status_dict return context I tried using object_list like in the template but it not working How can I loop through my list in my view ? Thx you -
Why Django DecimalField let me store Float or string?
I don't understand the behaviour of Django DecimalField. It's defined as: A fixed-precision decimal number, represented in Python by a Decimal instance. However, with the following model: class Article(models.Model) unit_price = DecimalField(max_digits=9, decimal_places=2) I can create an article in at least 3 ways: article = Article.objects.create(unit_price="2.3") type(article.unit_price) >>> str article = Article.objects.create(unit_price=2.3) type(article.unit_price) >>> float article = Article.objects.create(unit_price=Decimal('2.3')) type(article.unit_price) >>> decimal.Decimal Why Django DecimalField is able to return something else than Decimal type? What would be the best way to ensure my app never deals with floats for prices? Thanks. -
Django not running after restarting AWS AMI Elastic Beanstalk
I was recently fixing an Apache issue on an AWS AMI Elastic Beanstalk instance, I created an image and hence it restarted. After restarting, the application is not working. Do I have to run any command after restarting?