Using PythonAnywhere, Django, Github, and MySQL

2016-11-21 Thread Alexander Joseph
Hello, I am newly learning django, and have decided to use pythonanywhere and github for publishing/hosting my apps. I've been using php and mysql for a few years and like mysql. But I need some help with the initial setup so that everything works/clones smoothly between my app on my local

Re: File/Folder Sync API?

2016-12-29 Thread Alexander Joseph
ub.com/andres-torres-marroquin/django-dropbox > > > 2016-12-28 12:15 GMT-06:00 Alexander Joseph <alexander.v.jos...@gmail.com> > : > >> I'm building a collection of apps that write custom .docx and .xlsx >> files, and store them to a users account. These file

File/Folder Sync API?

2016-12-28 Thread Alexander Joseph
I'm building a collection of apps that write custom .docx and .xlsx files, and store them to a users account. These files need to be in a specific hierarchy and each user will have their own files/folders they can view and edit. It would really be great if I could allow each user to sync their

Re: How to save an invoice document with new record creation in the database

2017-08-16 Thread Alexander Joseph
en save becomes: > > def save(self, *args, **kwargs): > if not self.id: > today = datetime.date.today() > date_str = datetime.datetime.strftime(today, '%y%m%d') > doc_str = 'IN' > self.invoice_number = doc_str + date_str + &

How to save an invoice document with new record creation in the database

2017-08-14 Thread Alexander Joseph
Hello, I have an app for creating invoices, but I'd like to be able to save a .docx of the invoice when the user creates the invoice (I'm using docx library). I'm very new to django so any direction you can give I appreciate. I'd like to know the proper way to go about doing this. Right now I

Re: How can I auto-fill a field in the model without showing a form field to the user?

2017-07-25 Thread Alexander Joseph
invoice_number = date_str + new_invoice_num > super(Invoice, self).save(*args, **kwargs) > > > El dimarts, 25 juliol de 2017 6:23:44 UTC+2, Alexander Joseph va escriure: >> >> I'm new to django, but coming from php I think its the greatest thing >> ever. >&

How can I auto-fill a field in the model without showing a form field to the user?

2017-07-24 Thread Alexander Joseph
I'm new to django, but coming from php I think its the greatest thing ever. I have a model for Invoices ... {{{ from django.conf import settings from django.db import models from django.core.urlresolvers import reverse #from django.contrib.auth.models import User # Create your models here.

ValueError: invalid literal for int() with base 10:

2017-07-26 Thread Alexander Joseph
Hello, I came across this error: "*ValueError: invalid literal for int() with base 10:*" after I made a field in my models.py a ForeignKey. Below is my models.py from django.conf import settings from django.db import models from django.core.urlresolvers import reverse from django.utils import

Re: ValueError: invalid literal for int() with base 10:

2017-07-26 Thread Alexander Joseph
le. Thanks On Wednesday, July 26, 2017 at 1:27:28 PM UTC-6, Tim Chase wrote: > > On 2017-07-26 11:52, Alexander Joseph wrote: > > "*ValueError: invalid literal for int() with base 10:*" after I > > made a field in my models.py a ForeignKey. Below is my models

Is there a way to use input text placeholder when using {{ form.as_p }}

2017-07-26 Thread Alexander Joseph
I'm using {{ form.as_p }} in my template and would like to be able to use placeholders in the individual input fields. Is there a way to do this? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: ValueError: invalid literal for int() with base 10:

2017-07-26 Thread Alexander Joseph
works the way its supposed to now. On Wednesday, July 26, 2017 at 1:42:26 PM UTC-6, Alexander Joseph wrote: > > Hi, thanks for the reply, however when I take out the 'their_company' > field altogether everything works fine. Also in the error it references the > their_c

Re: Is there a way to use input text placeholder when using {{ form.as_p }}

2017-07-26 Thread Alexander Joseph
Perfect, thanks! On Wednesday, July 26, 2017 at 2:41:52 PM UTC-6, Lee Hinde wrote: > > in the init method of your form do something like this: > > self.fields['verification_date'].widget.attrs["placeholder"] = 'date' > > > On Jul 26, 2017, at 1:31 PM, Alexander

Re: How can I auto-fill a field in the model without showing a form field to the user?

2017-07-26 Thread Alexander Joseph
wrote: > > On 26/07/2017 3:15 AM, Alexander Joseph wrote: > > How did you learn all the methods that are available > > Django is very comprehensively documented and almost any question you > can think up is only a google search away. Typically a search will > revea

Re: How can I auto-fill a field in the model without showing a form field to the user?

2017-07-26 Thread Alexander Joseph
Good to know. Thanks again! On Monday, July 24, 2017 at 10:23:44 PM UTC-6, Alexander Joseph wrote: > > I'm new to django, but coming from php I think its the greatest thing ever. > > I have a model for Invoices ... > > {{{ > from django.conf import settings > from django

Placeholder and Label not working in form

2017-08-04 Thread Alexander Joseph
Hello, I would like to remove the labels in my sign-in form and just have placeholders in the text fields. Its working for my sing up form but for some reason not for my sign-in form. Below is my forms.py, my views.py, and my models.py. I think its because I'm using Django's auth view for the

Re: A lot of Problems with Migrating (conceptual)

2017-08-17 Thread Alexander Joseph
igrations you > shouldn't have any such problems. Migrations are tricky to understand but > once you do they work flawlessly. The next time you have a problem give us > some information with the exact error message so that we can explain what's > wrong. > > Regards, > >

Best way to structure a django project with multiple levels of sub apps?

2017-08-17 Thread Alexander Joseph
I'm bullding a larger django project and I'm starting to implement cookiecutter django after reading through "2 Scoops of Django" but still have some questions on structuring a project. I've setup my project, we'll call it 'business_proj'. In business_proj I started an app called

Re: A lot of Problems with Migrating (conceptual)

2017-08-22 Thread Alexander Joseph
2017 at 11:10:01 AM UTC-6, Alexander Joseph wrote: > > I'm pretty new to django and I've been having problems with > makemigrations/migrate and I wonder if Im doing things right. > > I'm using MySQL backend and after reading in the documentation a little it > sounds like Postgre

A lot of Problems with Migrating (conceptual)

2017-08-17 Thread Alexander Joseph
I'm pretty new to django and I've been having problems with makemigrations/migrate and I wonder if Im doing things right. I'm using MySQL backend and after reading in the documentation a little it sounds like Postgresql might make migrating more painless. Usually my problems stem from changing

Help with staticfiles in deployment

2017-09-30 Thread Alexander Joseph
Hello, My site is deployed on an ubuntu/nginx/gunicorn droplet on digitalOcean. For some reason my static files are not updating after running collectstatic. I have access to older static files but cant make updates to static files and see them in production. It works as it should on my

Re: Help with staticfiles in deployment

2017-10-01 Thread Alexander Joseph
, 2017 at 6:40:46 PM UTC-6, Alexander Joseph wrote: > > Hello, > > My site is deployed on an ubuntu/nginx/gunicorn droplet on digitalOcean. > For some reason my static files are not updating after running > collectstatic. I have access to older static files but cant make updates

Re: Help with staticfiles in deployment

2017-10-02 Thread Alexander Joseph
It was my nginx configuration. I hadnt noticed the staticfiles directory was pointing to the wrong place. Thanks for the help! On Sunday, October 1, 2017 at 9:37:04 PM UTC-6, Alexander Joseph wrote: > > environ allows you to use environment variables in your settings files, > heres

Re: Best way to implement a more complex user registration/auth flow?

2017-08-25 Thread Alexander Joseph
> active. > > Hope my answer helps you. > > Em sexta-feira, 25 de agosto de 2017 15:31:43 UTC-3, Alexander Joseph > escreveu: >> >> I'm currently using django.contrib.auth for my user authentication which >> works well for simple authentication/authorization

Re: A lot of Problems with Migrating (conceptual)

2017-08-27 Thread Alexander Joseph
now if you need anymore info to help me out with this. Thanks in advance On Friday, August 25, 2017 at 12:25:00 PM UTC-6, Alexander Joseph wrote: > > Awesome, thanks James, thats exactly what I'm looking for. I'll try layout > 1 first as you suggest > > > > On Wednesday, August 23

Re: Best way to implement a more complex user registration/auth flow?

2017-08-27 Thread Alexander Joseph
Thanks Eduardo, I will try that! On Saturday, August 26, 2017 at 2:05:22 PM UTC-6, Eduardo Balbinot wrote: > > You could do like this: when the user signs in you create the user in the > database and flags is_active as False, so the user won't be able to log in. > In your extended User model

trying to create allauth SignupForm subclass for customization....

2017-08-28 Thread Alexander Joseph
Hello, I'm trying to add some additional fields to the allauth signup form (first_name and last_name). I'm thinking the best way to do this is to create a allauth SignupForm subclass and add my own fields (very new to django so please let me know if I'm going about this wrong) I added

Re: A lot of Problems with Migrating (conceptual)

2017-08-23 Thread Alexander Joseph
the engineering sub-apps i have now under an engineering folder without any further hierarchy that would help as there will also be HR, financial apps, administration apps, etc. Thanks again On Wed, Aug 23, 2017 at 5:28 PM, Alexander Joseph < alexander.v.jos...@gmail.com> wrote: > Thanks James, a

Re: A lot of Problems with Migrating (conceptual)

2017-08-23 Thread Alexander Joseph
, 2017 at 3:57 PM, James Schneider <jrschneide...@gmail.com> wrote: > > > On Tue, Aug 22, 2017 at 12:37 PM, Alexander Joseph < > alexander.v.jos...@gmail.com> wrote: > >> Thanks for all the advice. >> >> One more question - could project structure be c

Re: A lot of Problems with Migrating (conceptual)

2017-08-25 Thread Alexander Joseph
Awesome, thanks James, thats exactly what I'm looking for. I'll try layout 1 first as you suggest On Wednesday, August 23, 2017 at 7:49:05 PM UTC-6, James Schneider wrote: > > > > On Wed, Aug 23, 2017 at 4:40 PM, Alexander Joseph <alexander...@gmail.com > > wrote: &

Best way to implement a more complex user registration/auth flow?

2017-08-25 Thread Alexander Joseph
I'm currently using django.contrib.auth for my user authentication which works well for simple authentication/authorization but I'd like to expand the registration/auth flow a little. Right now with the default flow users go to the signup page, signup, then are redirected to the login page

Re: trying to create allauth SignupForm subclass for customization....

2017-09-01 Thread Alexander Joseph
826 > > The reason: https://github.com/pennersr/django-allauth/blob/ > master/allauth/account/forms.py#L197 > > So, there is an import loop / inheritance problem: Allauth's SignupForm > makes itself a child of your custom form and you're trying to become it's > child. > > > O

Re: Python and Django traing

2017-08-29 Thread Alexander Joseph
This website is great https://pythonprogramming.net/ that guys one of the best teachers I've seen Theres also a guy on youtube (Bucky Roberts?) whos a pretty good teacher and has some good django tutorials to get you started. I think his channel is called 'thenewboston' I'd recommend

Re: A lot of Problems with Migrating (conceptual)

2017-08-29 Thread Alexander Joseph
sers/CA%2Be%2BciUKFGrv62awj%2BuuSSuVaS9uYqVs2%2Brv% > 3DJPsaxvmJGNTfg%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CA%2Be%2BciUKFGrv62awj%2BuuSSuVaS9uYqVs2%2Brv%3DJPsaxvmJGNTfg%40mail.gmail.com?utm_medium=email_source=footer> > . > > For more options, visit https:

Re: A lot of Problems with Migrating (conceptual)

2017-08-31 Thread Alexander Joseph
o the `migrate` > management > command and it will roll back to the point including that migration. > > Once you freeze the model design, feel free to squash some or all > migrations > into one file if things got a little big. > > > On Wed, Aug 30, 2017 at 12:16 AM, Alexande

Re: Having issue getting django working on shared hosting account

2017-08-29 Thread Alexander Joseph
I think getting a django project to work correctly on a shared hosting account might be tricky. If you're open to switching hosting I've tried PythonAnywhere, Heroku, and DigitalOcean and definitely recommend DigitalOcean. I think the majority of django developers recommend DigitalOcean too.

Re: A lot of Problems with Migrating (conceptual)

2017-08-29 Thread Alexander Joseph
On Tuesday, August 29, 2017 at 3:35:21 PM UTC-6, James Schneider wrote: > > > > On Tue, Aug 29, 2017 at 7:13 AM, Alexander Joseph <alexander...@gmail.com > > wrote: > >> I'm not specifying the app level, I'm just running "python manage.py >> makemigrations --sett

Re: Office365/SharePoint Online Integration

2017-12-16 Thread Alexander Joseph
, 'rb'), headers=headers) return response Thanks again for your advice On Friday, December 15, 2017 at 3:24:30 PM UTC-7, Erik Cederstrand wrote: > > > Den 15. dec. 2017 kl. 22.18 skrev Alexander Joseph < > alexander...@gmail.com >: > > > > I'm still new to

How to implement history/track changes for all users

2017-12-16 Thread Alexander Joseph
I have an app that keeps a database of products and parts of products that allows users to authenticate via their Office365 account. I'd like to track all the changes all users make (create, update, delete), which I want to make view-able by all users. It looks like there are a couple of

Re: nginx error in Digital Ocean

2017-12-14 Thread Alexander Joseph
I followed this guide and got everything running smooth https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04 Hope that helps On Tuesday, December 12, 2017 at 10:37:26 AM UTC-7, Coqui wrote: > > I am trying to deploy to digital

Re: Using PermissionRequiredMixin

2017-12-14 Thread Alexander Joseph
1 PM UTC-7, Alexander Joseph wrote: > > I'm trying to use the PermissionRequiredMixin but I'm a little confused on > how to use it. I keep getting an infinite redirect loop when the user tries > to visit the page if they dont have the required permissions. > > Here is my view > &g

Using PermissionRequiredMixin

2017-12-14 Thread Alexander Joseph
I'm trying to use the PermissionRequiredMixin but I'm a little confused on how to use it. I keep getting an infinite redirect loop when the user tries to visit the page if they dont have the required permissions. Here is my view from django.contrib.auth.mixins import LoginRequiredMixin,

Office365/SharePoint Online Integration

2017-12-15 Thread Alexander Joseph
I'm still new to django but I'm building an app that allows users to authenticate through Office365. I'm using this - https://github.com/Lamelos/django-allauth-office365 and I got users to be able to successfully sign in with office365 but I now need users to be able to upload documents to the

Re: How Can I Select Date Based on Monday Date?

2018-05-14 Thread Alexander Joseph
Ah yes, timedelta, thats what I meant instead of deltadate haha. Thanks again On Saturday, May 12, 2018 at 1:00:29 PM UTC-6, Alexander Joseph wrote: > > I'm building a timesheet app for employees and would like the employees to > be able to select a day of the week date based on what

How Can I Select Date Based on Monday Date?

2018-05-12 Thread Alexander Joseph
I'm building a timesheet app for employees and would like the employees to be able to select a day of the week date based on what the date was on Monday. ie. the user inputs the Monday date of the timesheet, then for each row they need to fill out they can select the Day/Date for each day that

Re: How Can I Select Date Based on Monday Date?

2018-05-13 Thread Alexander Joseph
+ deltadate (2) and so on. Still need to check if this does what I'm thinking it will though. I'll check out baklabel too On Sun, May 13, 2018, 6:47 PM Mike Dewhirst <mi...@dewhirst.com.au> wrote: > On 13/05/2018 5:00 AM, Alexander Joseph wrote: > > I'm building a timesheet ap

How would I turn this function into a CBV?

2018-06-13 Thread Alexander Joseph
I found a tutorial for putting forms in modals that works but its not using CBVs and I'd rather use CBVs. Here is the function that works... def gaas_create(request): form = GaasWaferDesignForm() context = {'form': form} html_form =

using modals for forms....

2018-06-11 Thread Alexander Joseph
I've tried every tutorial on how to use modals with forms in django and have basically got nowhere. The latest one I tried is this one https://dmorgan.info/posts/django-views-bootstrap-modals/ I seem to be running into the same problem with them though, which is I'm not sure where to put the

Forms in Bootstrap 4 Modals?

2018-06-19 Thread Alexander Joseph
I've posted this before but havent gotten any response. If more information is needed let me know and I'll get you anything I can. I basically want to use forms in Bootstrap 4 modals for my CRUD operations but cant really find a good tutorial or references to work from. I'm newer to Django

Re: Forms in Bootstrap 4 Modals?

2018-06-19 Thread Alexander Joseph
> I have done this and am happy to help, just give me some direction in > helping you > > On Tuesday, June 19, 2018 at 3:08:59 PM UTC-4, Alexander Joseph wrote: >> >> I've posted this before but havent gotten any response. If more >> information is needed let me know a

Re: Forms in Bootstrap 4 Modals?

2018-06-20 Thread Alexander Joseph
). If you can share the code I am happy to work with you on > either tutorial. > > I'm sorry, I don't have any tutorials to point to - I've been doing this > for a long time and just pieced it together from the underlying components. > > Kirby > > > > On Tuesday, J

Re: Forms in Bootstrap 4 Modals?

2018-06-20 Thread Alexander Joseph
ny tutorials to point to - I've been doing this > for a long time and just pieced it together from the underlying components. > > Kirby > > > > On Tuesday, June 19, 2018 at 5:13:19 PM UTC-4, Alexander Joseph wrote: >> >> Thanks very much! >> >> I've

Re: Forms in Bootstrap 4 Modals?

2018-06-26 Thread Alexander Joseph
Hey Kirby, Any ideas on where I should take this next? Thanks On Thursday, June 21, 2018 at 10:12:41 AM UTC-6, C. Kirby wrote: > > Ok, this is good to work with. Let us tackle this issue by issue. The > first issue is that your modal is not showing up. I see several possible > issues: > >

django-breadcrumbs with CBVs?

2018-05-01 Thread Alexander Joseph
I'm trying to use django-breadcrumbs (http://django-bootstrap-breadcrumbs.readthedocs.io/en/latest/) which looks like it works with function-based views the way I'd like to implement breadcrumbs, but I'm using exclusively class-based views. I'm still newer to django so not sure how I can use

Re: Upload of file with FileField working in admin but not in template

2018-05-03 Thread Alexander Joseph
er doesn't know how to encode the files > > Regards, > > Andréas > > 2018-05-03 18:44 GMT+02:00 Alexander Joseph <alexander.v.jos...@gmail.com> > : > >> I'm using CBVs and trying to upload a file with a FileField. It seems to >> work in admin but not i

How can I use a variable from the instance of my data in the upload path for a FileField in my model?

2018-05-03 Thread Alexander Joseph
Not even sure if you can do it this way. I'm thinking theres another way like overriding the save or the form_valid function in the view... but I'm trying to use a variable from my instance in my upload path for my file field. If I should do something like override the save method in the view

Upload of file with FileField working in admin but not in template

2018-05-03 Thread Alexander Joseph
I'm using CBVs and trying to upload a file with a FileField. It seems to work in admin but not in my template. It doesnt give any errors when creating the record and it saves the rest of the data in the form, but it doesnt save the attachment Heres my model class

Re: How can I use a variable from the instance of my data in the upload path for a FileField in my model?

2018-05-03 Thread Alexander Joseph
... design_document = models.FileField(upload_to=upload_path, blank=True) but for some reason my %Y/%m/%d/ no longer works. If I take out the %Y/%m/%d/ it works but if I leave it in it throws an exception. Does anyone know why? On Thursday, May 3, 2018 at 2:50:02 PM UTC-6, Alexander Joseph wrote

Re: How can I use a variable from the instance of my data in the upload path for a FileField in my model?

2018-05-03 Thread Alexander Joseph
> > On Thu, May 3, 2018 at 3:20 PM Alexander Joseph <alexander...@gmail.com > > wrote: > >> Actually I figured this out... kind of >> >> You have to make a method for assigning the upload path in the model.. >> something like >> >> def

Re: Forms in Bootstrap 4 Modals?

2018-06-21 Thread Alexander Joseph
a9d61e19fea%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/53d50894-98f7-4d92-a1c2-0a9d61e19fea%40googlegroups.com?utm_medium=email_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Best Regards, Alexander Joseph -- Y

Re: Forms in Bootstrap 4 Modals?

2018-06-21 Thread Alexander Joseph
nitial={'project': self.object, 'is_milestone': True}, > > ) > > > > def get_context_data(self, **kwargs): > > context = super().get_context_data(**kwargs) > > del context['object'] > > project = self.object # type: models.Project > > context['has_milestones'] = proje

Re: Forms in Bootstrap 4 Modals?

2018-06-21 Thread Alexander Joseph
So I changed the link to the button as you suggested, and put the static modal in the gaas_wafer_design_list.html file, and commented out the javascript at the bottom, and the modal is showing up as it should now. Heres my gaas_wafer_design_list.html file, highlighted with the changes {%

How to make a Purchase Order app?

2018-08-02 Thread Alexander Joseph
I've been working on a Purchase Order app but I'm getting a little confused how I'm going to put it all together. I have 3 models - class PurchaseOrder(models.Model): po_number = models.IntegerField(default=get_po_number, unique=True) po_date = models.DateField() invoice_number =

How to use multiple ForeignKeys

2018-07-30 Thread Alexander Joseph
I'm building a Purchase Order app that uses a ForeignKey for Vendors. I want to be able to use another ForeignKey for invoices once a Vendor is selected. So the choices of Invoices would get filtered based on the users selection of the Vendor. How would I do this in the model? I assume I'd

Re: How to make a Purchase Order app?

2018-08-03 Thread Alexander Joseph
e when a model is saved/created and then > update the subtotal in the PurchaseOrder. See here for information about > signals: https://docs.djangoproject.com/en/2.0/topics/signals/ > > Andréas > > 2018-08-02 19:27 GMT+02:00 Alexander Joseph >: > >> I've been workin

Trying to make an employee clock-in/clock-out app...

2018-08-15 Thread Alexander Joseph
I'm trying to make an employee clock-in/clock-out app but running into some problems. Here is my model... class ClockPunch(models.Model): employee = models.ForeignKey(settings.AUTH_USER_MODEL) date = models.DateField(auto_now_add=True) punched_in =

How to automatically fill out an auto increment number in form field?

2018-07-23 Thread Alexander Joseph
Hello, I have a model ... class PurchaseOrder(models.Model): po_number = models.IntegerField(unique=True) and a function ... def get_po_number(self, *args, **kwargs): if not self.id: last_po = PurchaseOrder.objects.order_by('po_number').last() if last_po:

Re: How to automatically fill out an auto increment number in form field?

2018-07-23 Thread Alexander Joseph
context. In C++ and Java it would be like the > `this` pointer. So you wouldn't generally pass "self" to a class member. > > Hope that helps! > > On 7/23/2018 1:39 PM, Alexander Joseph wrote: > > Hello, > > I have a model ... > > class PurchaseOrder(

Re: How to automatically fill out an auto increment number in form field?

2018-07-24 Thread Alexander Joseph
ber of objects then add > the new record > > On Tue, 24 Jul 2018, 02:55 Alexander Joseph, > wrote: > >> Thanks Michael and Gerald. With an auto key field or primary key field >> would users still be able to input their own value? And if so how would I >> be able to g

Re: Is it possible to create models inside a database model

2018-07-10 Thread Alexander Joseph
Also- this is assuming you're using CBVs, if youre just using FBVs its probably even easier on the view side, the model side would be the same On Tuesday, July 10, 2018 at 10:23:51 AM UTC-6, Alexander Joseph wrote: > > Good question - I'm looking for a similar solution myself. My appli

Re: Is it possible to create models inside a database model

2018-07-10 Thread Alexander Joseph
Good question - I'm looking for a similar solution myself. My application is a purchase order app so that a purchase order has details about the purchase order but also has an unspecified number of objects that belong to it (purchase items). The only way I can think this MIGHT work is making a

Best way to create a Purchase Order App?

2018-07-10 Thread Alexander Joseph
I'm trying to think of how I would make a purchase order app, where the purchase order itself has its details/information (vendor name, shipping type, payment terms, etc.) but it also has an unspecified (could be 1, could be 10, could be 20) actual purchase items with their own

Re: Is it possible to create models inside a database model

2018-07-10 Thread Alexander Joseph
it which field to use to relate to in a RDBMS sense. On Tuesday, July 10, 2018 at 11:30:00 AM UTC-6, aditya wrote: > > I am using CBVs in model.py file and FBVs in views.py file. > As in image :- > > On Tue, Jul 10, 2018, 10:29 PM Alexander Joseph > wrote: > >> Also- th

Re: Is there a way to make a field both foreignKey or allow user to fill it in themself?

2018-03-01 Thread Alexander Joseph
I think the solution is above my head at the moment. I'll have to look back into it once I get better at Django. Thanks for your help though On Tuesday, February 27, 2018 at 7:26:22 AM UTC-7, Alexander Joseph wrote: > > Is there a way to make a form field or model field either a forei

Re: Trying to create a CBV that allows user to copy a record

2018-03-01 Thread Alexander Joseph
; > Dylan > > > > On Wed, Feb 28, 2018 at 9:42 AM, Alexander Joseph <alexander...@gmail.com > > wrote: > >> I'd like to create a CBV to allow users to copy a record, except for item >> specific information. - I'm making a fixed assets app and if there are 2

if statement for development/production mode in templates?

2018-04-23 Thread Alexander Joseph
Hello, is there a way to make an if statement that is based on whether you are running in development mode or production mode? Or based on which settings file you are using? My app allows users to login with their office365 account instead of with django allauth and I'd like to only give them

Re: if statement for development/production mode in templates?

2018-04-23 Thread Alexander Joseph
I dont know what that means On Monday, April 23, 2018 at 7:49:25 AM UTC-6, larry@gmail.com wrote: > > On Mon, Apr 23, 2018 at 9:34 AM, Alexander Joseph > <alexander...@gmail.com > wrote: > > Hello, is there a way to make an if statement that is based on whether &

Re: if statement for development/production mode in templates?

2018-04-23 Thread Alexander Joseph
; Did you write the app? > > On Mon, Apr 23, 2018 at 9:55 AM, Alexander Joseph > <alexander...@gmail.com > wrote: > > I dont know what that means > > > > On Monday, April 23, 2018 at 7:49:25 AM UTC-6, larry@gmail.com > wrote: > >>

Best Way to Implement Breadcrumbs?

2018-04-24 Thread Alexander Joseph
Whats the best way to implement breadcrumbs in a django template? I'd like something that will track where the user came from and can offer putting the link back in something like an Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To

django development env is using a ton of disk space and super slow

2018-03-25 Thread Alexander Joseph
I recently setup a django development environment at home on Windows the same way I've done 100 times and for some reason it is ridiculously slow and uses close to 100% of the disk space when I run the server in the command line. I dont know what could be causing it. Has anyone else had this

Re: django development env is using a ton of disk space and super slow

2018-03-25 Thread Alexander Joseph
It was Malwarebytes. I had both installed concurrently before but apparently they dont work well together now. I uninistalled Malwarebytes and its working fine now On Sunday, March 25, 2018 at 7:36:19 AM UTC-6, Alexander Joseph wrote: > > I recently setup a django development envir

Re: Trying to create a CBV that allows user to copy a record

2018-03-05 Thread Alexander Joseph
model = FixedAsset template_name = 'administration/fixed_assets/fixed_asset_form.html' def get_initial(self): initial = super().get_initial() initial["manufacturer"] = fixed_asset.pk.manufacturer return initial And this is my url url(r'^fixed_assets/copy/(?P\d+)

Is there a way to make a field both foreignKey or allow user to fill it in themself?

2018-02-27 Thread Alexander Joseph
Is there a way to make a form field or model field either a foreign key reference or allow the user to fill in something themselves? I'm making a fixed assets app and each fixed asset has an owner field, which I would like to assign to an app user if possible, and if not possible be able to

Re: Is there a way to make a field both foreignKey or allow user to fill it in themself?

2018-02-27 Thread Alexander Joseph
for your reply On Tuesday, February 27, 2018 at 7:45:51 PM UTC-7, Mike Dewhirst wrote: > > On 28/02/2018 1:26 AM, Alexander Joseph wrote: > > Is there a way to make a form field or model field either a foreign > > key reference or allow the user to fill in something themselve

Trying to create a CBV that allows user to copy a record

2018-02-28 Thread Alexander Joseph
I'd like to create a CBV to allow users to copy a record, except for item specific information. - I'm making a fixed assets app and if there are 2 of the same laptop I'd like the user to be able to make one record in the database, then copy it minus the serial number and asset tag number which