Re: Django login() function works in production but not in development

2018-05-21 Thread pieceofkayk2718
I should elaborate even further.. The 'do something' does not show, instead the 'do something else' shows. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: Django login() function works in production but not in development

2018-05-21 Thread pieceofkayk2718
Thanks, I probably should elaborate on that. I determine the user does not get logged in through the logic of my template language. I have {% if user.is_authenticated %} do something {% else %} do something else {% endif %} where user is passed through the context dictionary of my

Re: Django login() function works in production but not in development

2018-05-16 Thread pieceofkayk2718
Hey, Tonghua. Could you elaborate more on the shared set of databases? So yes, the login session is stored in the database. But wouldn't my two applications have two distinct database files? My reasoning would be due to having two distinct locations for my in-development copy and

Django login() function works in production but not in development

2018-05-14 Thread pieceofkayk2718
Hey All, So I have a django project in a directory for production. I have the same exact project in a separate repository for development. I literally have copied and pasted my project over and the only changes I have made are switching debug from false to true. So my project has the same

Upload file to a dynamically generated location

2018-01-08 Thread pieceofkayk2718
Hey Friends, I'm having trouble figuring out how to upload a document model to a dynamically generated location. The following models.py file contains two models and a helper function views.py # I would like the string inputs to be self.bundle.user, and self.bundle.name where self is the

Re: View to download a tar archive

2017-09-15 Thread pieceofkayk2718
Ahh, thank you James. :). Especially for that last link! > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post

View to download a tar archive

2017-09-14 Thread pieceofkayk2718
Hey guys, I'm trying to make a view so that my users can download a compressed tar archive. I've seen a ton of examples about downloading files yet cannot seem to find anything regarding tar. Anyone want to drop me an awesome example? for a simple file I have def download_file(request,

Re: include template in a page

2017-08-23 Thread pieceofkayk2718
Do you have an action on your register form? Like -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this

Re: Retrieving objects created in trasaction

2017-08-23 Thread pieceofkayk2718
Try foo.save() before foo.bars.add(). > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group,

Re: Use separate apps or only one app in my project

2017-08-23 Thread pieceofkayk2718
Can you give a more concrete example? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send

ManyToManyField's add() function is doing nada for me.

2017-08-23 Thread pieceofkayk2718
I am simply trying to add a Bundle model to my Instrument model. It should be really easy but I can't seem to figure out why it's not working. context.models.py class Instrument(models.Model): title = models.CharField(max_length=200) bundle = models.ManyToManyField(Bundle, blank=True)

Re: Deploying Django Tutorials or Guides - mod_wsgi, Apache, Linux

2017-08-22 Thread pieceofkayk2718
I should add Python 2.7, Django 1.11 > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send

Deploying Django Tutorials or Guides - mod_wsgi, Apache, Linux

2017-08-22 Thread pieceofkayk2718
Does anyone have any good tutorials or guides on how to deploy a Django project using mod_wsgi, Apache, and Linux? The documentation isn't really cutting it for my beginner self. Thanks in advance! -- You received this message because you are subscribed to the Google Groups "Django users"

Permissions: Let only the user who created the model see the detail view for the model

2017-08-07 Thread pieceofkayk2718
Hey, I am building an app where a user needs to create Bundle models. I am providing a Bundle detail view with options for the user to add components or edit the components in their Bundle model. I currently have it where any signed in user can access these bundles. I would like to restrict

Re: csrf_token during registration is giving me problems

2017-08-01 Thread pieceofkayk2718
fml. Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to

Re: csrf_token during registration is giving me problems

2017-08-01 Thread pieceofkayk2718
fml. Thank you. On Tuesday, August 1, 2017 at 12:55:10 PM UTC-6, Dylan Reinhold wrote: > > You have a quoting miss-match in your enctype, that might be messing with > the csrf_token > >enctype='multipart/form-data"> > > On Tue, Aug 1, 2017 at 9:57 AM, > wrote: > >>

csrf_token during registration is giving me problems

2017-08-01 Thread pieceofkayk2718
Hey, I recently started playing with my user registration and login and logout stuff for an app. It worked fine before I moved it but now that it's moved I keep getting the following error: Forbidden (403) > > CSRF verification failed. Request aborted. > Help > > Reason given for failure:

Re: User accessibility to multiple versions of an app.

2017-07-20 Thread pieceofkayk2718
Thanks James. I'm working with Data Labels =]. Give me a minute to go over my project to see which of the two design patterns would best suit my needs. I really appreciate the long and in-depth response. Will get back to you after some analysis. K -- You received this message because you

User accessibility to multiple versions of an app.

2017-07-20 Thread pieceofkayk2718
Hey, I've been running into issues trying to figure out how a user could be able to access multiple versions of an app. Here is the following example: I have an app named ANNA. ANNA is used to build labels and these labels are dependent upon different standards that come out. For example, we

Re: Database validation error - Even after manage.py flush.

2017-06-30 Thread pieceofkayk2718
Hey thanks for that extra input. I'm currently a student at NMSU making an educational app for NASA'S Planetary Data Systems. Right now I'm the only student working on it and the only person in my building that knows Django (which I'm learning on the job). I'm making a blog alongside my app

Re: Database validation error - Even after manage.py flush.

2017-06-30 Thread pieceofkayk2718
Oh dude you are officially my hero! I didn't even think about the migration files. That totally worked. And thank you thank you thank you =D <3. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Database validation error - Even after manage.py flush.

2017-06-30 Thread pieceofkayk2718
I also did the "If all else fails, reboot your computer" and still have the same problem. Haha. I think I'm screwed. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: Database validation error - Even after manage.py flush.

2017-06-30 Thread pieceofkayk2718
Yes. At first I tried setting default=True or default=False for my BooleanField and kept getting the same error. So I went back in, deleted the model, tried again, got the same error. Then I deleted my db sqlite3 file, made new migrations, migrated (with the model not even a part of my

Database validation error - Even after manage.py flush.

2017-06-30 Thread pieceofkayk2718
So I made the ultimate error. I put a BooleanField in my models.py, when I made migrations I set default col value to the empty string ''.. Then I migrated and got a validation error. However, I have tried to delete the model containing BooleanField, delete my database file, and I even ran

Create media directory for each user upon user registration

2017-06-26 Thread pieceofkayk2718
Hey all, I've been trying to figure out how to create a directory in my media directory for each user upon user registration. I have found a lot of resources on how to upload files to a directory but just about none on simply how to create the directory. I would like to be able to have my

Re: ModuleNot Found Error

2017-06-26 Thread pieceofkayk2718
Don't forget to add your app to the list of INSTALLED_APPS. See below. On Monday, June 26, 2017 at 4:09:00 AM UTC-6, akhil kumar wrote: > > this is my polls/urls.py > > > from django.conf.urls import url > from . import views > > urlpatterns=[ > url(r'^$',views.index,name='index'), >